|
1 | 1 | from setuptools import setup, find_packages
|
2 | 2 |
|
3 |
| -VERSION = "0.0.1" # Version of your package |
| 3 | +VERSION = "0.0.2" # Version of your package |
4 | 4 | DESCRIPTION = 'Setups: Dynamically generate setup.py for Python projects.'
|
5 | 5 |
|
6 | 6 | # Reading the long description from README.md if exists
|
|
30 | 30 | python_requires='>=3.6', # Minimum Python version required
|
31 | 31 | install_requires=[ # Dependencies needed to run the package
|
32 | 32 | 'click', # For creating command-line interfaces
|
| 33 | + 'setuptools', # For packaging the project |
| 34 | + 'twine', # For uploading the package to PyPI |
| 35 | + 'wheel', # Add wheel to create binary distributions |
33 | 36 | ],
|
34 | 37 | setup_requires=['pytest-runner'], # For running tests during installation
|
35 | 38 | tests_require=['pytest'], # Dependencies for running tests
|
|
45 | 48 | ],
|
46 | 49 | },
|
47 | 50 | )
|
| 51 | + |
| 52 | +# Guide for the user after installation |
| 53 | +print(""" |
| 54 | +************************************************** |
| 55 | +Installation Complete! |
| 56 | +
|
| 57 | +Once you've installed the package, you can now use the 'setup' command to generate setup.py for your Python project. |
| 58 | +
|
| 59 | +Usage: |
| 60 | + setup <project_name> |
| 61 | +
|
| 62 | +This will ask you a series of questions to generate a setup.py file for your project. Once the setup.py is generated: |
| 63 | +
|
| 64 | +🎉 Here's what you need to do next to upload your package to PyPI: |
| 65 | +
|
| 66 | +Step 1: Create the Distribution |
| 67 | +-------------------------------- |
| 68 | +Run the following commands to build the distribution: |
| 69 | +
|
| 70 | + python setup.py sdist bdist_wheel |
| 71 | +
|
| 72 | +This creates both source (.tar.gz) and wheel (.whl) distributions in the dist/ folder. |
| 73 | +
|
| 74 | +Step 2: Upload to PyPI |
| 75 | +----------------------- |
| 76 | +Once you've built the distribution, upload it to PyPI with the following: |
| 77 | +
|
| 78 | + twine upload dist/* |
| 79 | +
|
| 80 | +This will prompt you for your PyPI credentials and upload your package. |
| 81 | +
|
| 82 | +You're all set to share your package with the world! 🚀 |
| 83 | +
|
| 84 | + ------------------- |
| 85 | + | _______________ | |
| 86 | + | |XXXXXXXXXXXXX| | |
| 87 | + | |XXXXXXXXXXXXX| | |
| 88 | + | |XXXXXXXXXXXXX| | |
| 89 | + | |XXXXXXXXXXXXX| | |
| 90 | + | |XXXXXXXXXXXXX| | |
| 91 | + |_________________| |
| 92 | + _[_______]_ |
| 93 | + ___[___________]___ |
| 94 | +| [_____] []|__ |
| 95 | +| [_____] []| \__ |
| 96 | +L___________________J \ \___\/ |
| 97 | + ___________________ /\\ |
| 98 | +/###################\\ (__) |
| 99 | +
|
| 100 | +Thank you for using our tool. For more details on usage, please refer to the documentation: |
| 101 | +https://github.com/muhammad-fiaz/setups-python#usage |
| 102 | +
|
| 103 | +************************************************** |
| 104 | +""") |
| 105 | + |
0 commit comments