GitAuto: [FEATURE] Add PIP/PyPI
support
#476
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Original issue: #229
What is the feature
The feature is to add support for publishing the project to PIP/PyPI, allowing users to easily install and manage the package using Python's package manager.
Why we need the feature
Publishing the project to PIP/PyPI will increase its accessibility and usability by allowing Python developers to install it with a simple command. This will also help in reaching a wider audience and encourage community contributions.
How to implement and why
Prepare the Package:
setup.py
file in the root directory. This file is essential for defining the package metadata and dependencies.setup.py
includes necessary information such asname
,version
,author
,author_email
,description
,long_description
,url
,packages
,install_requires
, etc.Create a Distribution:
setuptools
to create a source distribution and a wheel distribution. This can be done by runningpython setup.py sdist bdist_wheel
.README.md
is included in the distribution as the long description for the package.Register and Upload to PyPI:
twine
to upload the package to PyPI by runningtwine upload dist/*
.Documentation and Examples:
README.md
with installation instructions using PIP.Continuous Integration:
About backward compatibility
Backward compatibility should be maintained by ensuring that the package's API remains consistent with previous versions. Any breaking changes should be clearly documented, and versioning should follow semantic versioning principles to communicate changes effectively.
Test these changes locally