Closed martinalbert closed 7 months ago
- Adds reading of
__version__.py
file avoiding initialization of the package prematurely
@martinalbert It's not clear to me why this is needed, could you elaborate?
@Toreno96 sure, the change regarding version is required mainly due to how python module pypa/build
for building is working. Using older, deprecated, tool bdist_wheel
(python setup.py sdist bdist_wheel
) which does not throw an error when importing version like it was before this change, should be avoided and for building we should use pypa/build
. I don’t know exactly how differently they work, but it has something to do with how these tools initialize and load package setup.
the change regarding version is required mainly due to how python module
pypa/build
for building is working. Using older, deprecated, toolbdist_wheel
(python setup.py sdist bdist_wheel
) which does not throw an error when importing version like it was before this change, should be avoided and for building we should usepypa/build
. I don’t know exactly how differently they work, but it has something to do with how these tools initialize and load package setup.
@martinalbert Do you mean that pypa/build
is not able to use a version imported from a module like bdist_wheel
? Am I getting it right?
A loose idea, but what if we try to go extra simple and define the version inline in the setup.py
itself, instead of having a separate file and hacking its content into the setup.py
? What could be the possible cons of that?
@Toreno96 Yes, when using pypa/build
and imported version from a module, it probably tries to automatically find other needed dependecies (even though version file is not using any), which are at the time of setup.py not needed nor available.
I responded here regarding the version in setup.py.
This PR adds necessary fixes to make new releases possible.
requirements.txt
for defining required dependencies (for commandpip install -r requirements.txt
)__version__.py
file with use ofexec
- avoiding initialization of the package prematurelyHTTPError
from packagerequests