Open andrecastro0o opened 2 months ago
in https://setuptools.pypa.io/en/latest/userguide/quickstart.html it is stated that
Every python package must provide a pyproject.toml and specify the backend (build system) it wants to use.
However the repo hav no ncqc.toml
, instead it uses setup.py
According to quickstart.html#transitioning-from-setup-py-to-declarative-config
we are transitioning from defining all your package information by running setup() to doing this declaratively - by using pyproject.toml
https://packaging.python.org/en/latest/discussions/setup-py-deprecated/#setup-py-deprecated
Mentions that although setup.py
is NOT deprecated
python setup.py
and the use ofsetup.py
as a command line tool are deprecated.
With the following commands NOT MEANT be run anymore:
python setup.py install
python setup.py develop
python setup.py sdist
python setup.py bdist_wheel
which is exactly what is instructed in the README python setup.py bdist_wheel
https://packaging.python.org/en/latest/guides/modernize-setup-py-project/ explains how to modernize and replace setup.py with myproject.toml
Given these facts, I consider necessary to modernize the build setup, by:
build
To have your project installable from a Package Index like PyPI, you’ll need to create a Distribution (aka “Package”) for your project.
steps:
python3 -m build
twine check dist/*
Checking dist/ncqc-0.1.0-py3-none-any.whl: PASSED
Checking dist/ncqc-0.1.0.tar.gz: PASSEDtwine upload --repository testpypi dist/*
[^2]Once uploaded to testpypi, the module is indexed and pip installable:
pip install -i https://test.pypi.org/simple/ ncqc
[^1]: A wheel is a built package, as opposed to a "source distribution” which is unbuilt, and can be installed without going through the “build” process.
[^2]: for uploading a changed version, without chaning the version number, include --skip-existing
: twine upload --skip-existing --repository testpypi dist/*
After a few version bumps and uploads to https://test.pypi.org/project/ncqc/, which failed when pip install -i https://test.pypi.org/simple/ ncqc
due to conflicting library versions, seems I seem to have had success
pip install -i https://test.pypi.org/simple/ ncqc==0.1.10
Looking in indexes: https://test.pypi.org/simple/
Collecting ncqc==0.1.10
Using cached https://test-files.pythonhosted.org/packages/7f/8e/0321294a0b422354a0f541bd254e78217c59993ff09cf73a14d6aa3626da/ncqc-0.1.10-py3-none-any.whl (37 kB)
Installing collected packages: ncqc
Successfully installed ncqc-0.1.10
pip freeze
ncqc==0.1.10
Collecting ncqc==0.1.33
Using cached https://test-files.pythonhosted.org/packages/66/8c/adf767840deb2352cd7926e5c309ad40abde5c6b7080f5d735d2e0a9bde4/ncqc-0.1.33-py3-none-any.whl.metadata (50 kB)
INFO: pip is looking at multiple versions of ncqc to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement PyYAML~=6.0.1 (from ncqc) (from versions: 3.11)
ERROR: No matching distribution found for PyYAML~=6.0.1
The README instruct the user to install the library from source by performing the following steps