pip repos are located online at https://pypi.org/
You need a setup.py that looks like this:
import setuptools
setuptools.setup(
name="contraption",
version="0.0.1",
author="Joe Je",
author_email="ars@google.edu",
description="pyvisa support for powersupplies DPO and DAQs (Aglient, Keithley, Tektronix, Lecroy)",
long_description="pyvisa support for powersupplies DPO and DAQs (Aglient, Keithley, Tektronix, Lecroy)",
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
url="https://github.com/Tsangares/Devices",
install_requires=[
"matplotlib==3.0.2",
"numpy==1.15.4",
"PyVISA==1.9.1",
],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
],
)
Assuming your working directory is close to the one you want to upload.
Use the command: python setup.py sdist
This will produce a file in a folder called dist
that needs to be uploaded to pypi
There are many ways to upload it, I use the program called twine
and use the following command:
twine upload --repository-url https://upload.pypi.org/legacy/ dist/myrepo-0.0.1.tar.gz
Please not, the version in setup.py must be incremented before uploading to pypi. If you make a significant change and want to update the repo:
- Increment setup.py
- Run
python setup.py sdist
- Run
twine upload --repository-url https://upload.pypi.org/legacy/ dist/myrepo-0.0.1.tar.gz
with the correct version number.