Skip to content

Commit de80230

Browse files
fixed the setup.py missing comma and added doc guide (#2)
1 parent 97bb769 commit de80230

File tree

3 files changed

+63
-5
lines changed

3 files changed

+63
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ setup <project_name>
4747
## Example
4848

4949
```bash
50-
$ setup new my-awesome-project
50+
$ setup my-awesome-project_name
5151
Version (e.g., 0.1.0): 0.1.0
5252
Short project description: An awesome project
5353
License type: MIT

setup.py

+59-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import setup, find_packages
22

3-
VERSION = "0.0.1" # Version of your package
3+
VERSION = "0.0.2" # Version of your package
44
DESCRIPTION = 'Setups: Dynamically generate setup.py for Python projects.'
55

66
# Reading the long description from README.md if exists
@@ -30,6 +30,9 @@
3030
python_requires='>=3.6', # Minimum Python version required
3131
install_requires=[ # Dependencies needed to run the package
3232
'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
3336
],
3437
setup_requires=['pytest-runner'], # For running tests during installation
3538
tests_require=['pytest'], # Dependencies for running tests
@@ -45,3 +48,58 @@
4548
],
4649
},
4750
)
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+

setups/cli.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ def generate_setup(project_name):
102102
tests_require={test_dependencies}, # Specify dependencies needed for running tests
103103
license="{license_type}", # License under which the project is released
104104
project_urls={{ # Additional URLs related to your project
105-
"Source Code": "{project_url}"
106-
"Bug Tracker": "{bug_tracker_url}"
107-
"Documentation": "{documentation_url}"
105+
"Source Code": "{project_url}" ,
106+
"Bug Tracker": "{bug_tracker_url}",
107+
"Documentation": "{documentation_url}",
108108
}},
109109
)
110110
"""

0 commit comments

Comments
 (0)