Modernize Python packaging with pyproject.toml and enhanced compatibility.#755
Open
RedZapdos123 wants to merge 1 commit intoJDAI-CV:masterfrom
Open
Conversation
This modernization brings FastReID up to current Python packaging standards and makes installation more reliable across different environments. The changes include adding modern pyproject.toml with proper dependency management. The new configuration supports Python 3.8-3.12 with proper version constraints. CLI entry points have been added for fastreid-train, fastreid-test, and fastreid-demo commands. The installation documentation has been updated to reflect modern practices. Backward compatibility is maintained with the existing setup.py file. Optional dependencies have been organized for GPU support, FAISS integration, and development tools. This modernization significantly improves the user experience and aligns FastReID with current Python packaging standards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary:
This PR modernizes FastReID's packaging system by migrating from traditional setup.py to modern pyproject.toml, bringing the project up to current Python packaging standards and improving installation reliability across different environments.
Key Changes:
Modern Packaging
The changes include a complete migration to PEP 517/518 standards with pyproject.toml. Extended compatibility has been added to latest Python versions 3.8-3.12. Proper version constraints and optional dependencies have been implemented. CLI entry points have been added for fastreid-train, fastreid-test, and fastreid-demo commands.
Installation Improvements:
Simplified installation is now available with pip install fastreid and proper dependency resolution. Optional dependencies have been organized for GPU support, FAISS integration, and development tools. Backward compatibility has been maintained with setup.cfg for legacy systems.
Developer Experience:
Proper development tools have been included such as pytest, black, isort, and flake8. Direct command-line access to FastReID tools is now available through entry points. The implementation follows current Python packaging best practices.
Benefits:
Testing:
Installation from source works correctly. CLI entry points function properly. All dependencies resolve correctly. Backward compatibility has been maintained.
Changes:
The minimum Python version has been increased to 3.8 from 3.6. Some internal import paths may change as CLI tools now have proper entry points.
Migration Guide:
For users upgrading, the old way was python tools/train.py --config-file configs/... and the new way is fastreid-train --config-file configs/...
This change significantly improves the user experience and brings FastReID in line with modern Python packaging standards.