esa / opengeode

OpenGEODE - a free SDL editor
https://opengeode.net
GNU Lesser General Public License v3.0
69 stars 20 forks source link

extract version into separate module #91

Closed asmodehn closed 1 year ago

asmodehn commented 1 year ago

extracting version into separate module to allow retrieving version from setup.py without requiring all dependencies.

asmodehn commented 1 year ago

Currently running setup.py to build a release, install the package or anything else, requires having all opengeode dependencies already installed in the environment. This prevent using the dependency mechanism in setup.py and have them automatically installed via pip, as installing a usual package would do. Meaning we also cannot test that the package will install the required dependencies when someone will install it.

Having the version readable like in this PR allows someone to :

Ref: https://packaging.python.org/en/latest/guides/single-sourcing-package-version/?highlight=__version__ Current solution is point 6. (and I am talking about the warning there) Proposed solution here is point 3. to not have that problem.