/project/
/package/
__init__.py
module.py
setup.py
from .module import *
__version__ = '0.1'# this file just contains your module's codefrom setuptools import setup
setup(name='module',
version='0.1',
description='What the module does',
url='https://github.com/username/repo',
author='Your Name',
author_email='email@domain.net',
license='MIT',
packages=['module'],
install_requires=['numpy>=1.11',
'matplotlib>=1.5'])Create a file in the home directory called ~/.pypirc with contents:
[distutils]
index-servers = pypi
[pypi]
repository = https://pypi.python.org/pypi
username = YourPyPiUsername
password = YourPyPiPassword
Open terminal window and change directory to /project/
Then run setup.py with sdist to build a source distribution and bdist_wheel to build a
wheel (with --universal flag if your package is Python 2/3 universal). Then use twine to
register it and upload to pypi.
python setup.py sdist bdist_wheel --universal
twine register dist/project-x.y.z.tar.gz
twine register dist/mypkg-0.1-py2.py3-none-any.whl
twine upload dist/*Update the change log and edit the version number in setup.py and package/__init__.py and docs/source/conf.py.
Open terminal window and change directory to /project/ then run setup.py with
sdist to build a source distribution and bdist_wheel to build a wheel (with
--universal flag if your package is Python 2/3 universal). Remove old versions
from /project/dist/ and then use twine to upload to pypi.
python setup.py sdist bdist_wheel --universal
twine upload dist/*To tag your current commit as a released version, run:
git tag -a v0.1 -m "annotation for this release"
git push origin --tagsIf you already have a conda-forge feedstock forked to your own GitHub account, first re-render the feedstock with:
conda-smithy rerenderThen edit recipe/meta.yaml to update the version, hash, etc. To calculate the sha256
hash, run:
openssl dgst -sha256 path/to/package_name-0.1.1.tar.gzThen, commit and push the yaml file to GitHub:
git pull upstream master
git add --all
git commit -m 'version bump to v0.1.1'
git pushFinally, issue a pull request to conda-forge.
Hello Geoff Boeing, I'm unable to follow few things in this blog.
where should I create ~/.pypirc. Under project?
What is the file name is it only .pypirc?
On executing python setup.py sdist bdist_wheel --universal, I get the following error: package directory 'module' does not exist
I wish to get more clarity on this exercise, can you please spend some time to skype with me. Oh, myself Sudarson a comp-science student. Looking forward eagerly to hearing back from you. Thanks