Simplify installation prefix detection #669
a-andre/linux-app:resource into master
@ -31,6 +31,7 @@ packages =
python_requires = >= 3.6
install_requires =
eduvpn_common >= 4.0.0,< 5.0.0
importlib_resources;python_version<'3.10'
tbh, I think we should just drop support for python < 3.10
the minimum version is 3.10 because of ubuntu 22.04
See #670.
@ -160,3 +156,1 @@
if path.isfile(path.join(option, target)):
return option
raise Exception("Can't find eduVPN installation")
return str(importlib.resources.files('eduvpn') / 'data')
does this all work for the deb, rpm and pip packages? What if you have eduvpn installed with both pip and deb/rpm?
does this all work for the deb, rpm and pip packages?
yes
What if you have eduvpn installed with both pip and deb/rpm?
This should not be a problem. Like importing an eduvpn module is not a problem if it is installed with both. Because the module import and the resource import are based on the same system. To quote from https://docs.python.org/3/library/importlib.resources.html
This module leverages Python’s import system to provide access to resources within packages.
79e5553be5
to e591956d31
e591956d31
to c230c3959c
This can be rebased now
c230c3959c
to 9e70cfdf76
9e70cfdf76
to 9bdddb8f4e
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.
No due date set.
No dependencies set.
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?