|
| 1 | +from setuptools import setup, find_packages |
| 2 | + |
| 3 | +VERSION = "0.0.1" # Version of your package |
| 4 | +DESCRIPTION = 'Setups: Dynamically generate setup.py for Python projects.' |
| 5 | + |
| 6 | +# Reading the long description from README.md if exists |
| 7 | +try: |
| 8 | + with open("README.md", "r", encoding="utf-8") as fh: |
| 9 | + LONG_DESCRIPTION = fh.read() |
| 10 | +except FileNotFoundError: |
| 11 | + LONG_DESCRIPTION = DESCRIPTION # Fallback to DESCRIPTION if README.md is missing |
| 12 | + |
| 13 | +setup( |
| 14 | + name="setups", # Name of your package |
| 15 | + version=VERSION, # Package version |
| 16 | + author="Muhammad Fiaz", # Author name |
| 17 | + author_email="contact@muhammadfiaz.com", # Author's email |
| 18 | + description=DESCRIPTION, # Short description |
| 19 | + long_description=LONG_DESCRIPTION, # Detailed description from README.md |
| 20 | + long_description_content_type="text/markdown", # Format of the long description |
| 21 | + url="https://github.com/muhammad-fiaz/setups-python", # URL to the project's GitHub page |
| 22 | + packages=find_packages(), # Automatically find all packages in the directory |
| 23 | + classifiers=[ # List of classifiers to categorize your package |
| 24 | + "Development Status :: 3 - Alpha", |
| 25 | + "Intended Audience :: Developers", |
| 26 | + "Programming Language :: Python :: 3", |
| 27 | + "License :: OSI Approved :: MIT License", |
| 28 | + "Operating System :: OS Independent", |
| 29 | + ], |
| 30 | + python_requires='>=3.6', # Minimum Python version required |
| 31 | + install_requires=[ # Dependencies needed to run the package |
| 32 | + 'click', # For creating command-line interfaces |
| 33 | + ], |
| 34 | + setup_requires=['pytest-runner'], # For running tests during installation |
| 35 | + tests_require=['pytest'], # Dependencies for running tests |
| 36 | + license='MIT', # License for the project |
| 37 | + project_urls={ # Additional URLs related to your project |
| 38 | + 'Source Code': 'https://github.com/muhammad-fiaz/setups-python', |
| 39 | + 'Bug Tracker': 'https://github.com/muhammad-fiaz/setups-python/issues', |
| 40 | + 'Documentation': 'https://github.com/muhammad-fiaz/setups-python#readme', |
| 41 | + }, |
| 42 | + entry_points={ # CLI Entry Point |
| 43 | + 'console_scripts': [ |
| 44 | + 'setup = setups.cli:generate_setup', # This links 'setup' command to generate_setup function |
| 45 | + ], |
| 46 | + }, |
| 47 | +) |
0 commit comments