Ready to publish your own written python1. Create a folder for the module first
mkdir Nester
2. Create a file named "setup.py" in the new folder
In this file contains metadata about the publication. edit this file to add the following code:
From Distutils.core import setupsetup (name = ' Nester ', Version = ' 1.0.0 ', py_modules = [' Nester '], author = ' Luxury ', aut Hor_email = ' [email protected] ', url = ' luxiaorui.duapp.com ', description = ' xxxxxxxxxx ',)
3. Build a publishing file
Python3 setup.py sdist
4. Install the publication to your local python copy
Sudo/usr/local/bin/python3 setup.py Install
The release is ready.
Register PyPI website
http://pypi.python.org/, register a PyPI ID
Uploading code to PyPI python3 setup.py Register
Need to enter username, password, only this time
Python3 setup.py sdist Upload
Python released!!