For a standard release, follow this checklist:
Commit your code.
Check your code formatting (using
Check your branch.
(If you are on a branch, you might want to)
Release your code…
The release process supports GIT (and used to support Mercurial).
The fabric release task will deploy your module to a package index of your
dev). For details on setting up your own package index,
see the devpi documentation.
This task prefixes your application name with a name of your choosing. This prevents name clashes with other packages on the python package index (PyPI).
I recommend choosing a short version of your company name e.g.
~/.pypirc file or
release will fail.
See .pypirc for details.
Start by committing your code to the version control system.
Check you don’t have any missing migrations (from Checking that Django has all migrations):
django-admin.py makemigrations --check --dry-run --settings=settings.dev_test > /dev/null || echo "Missing migrations."
Release the module and upload to your package index. In this first example, we
switch to the
fabric virtual environment which is using python
fabric is currently not compatible with python 3):
cd /your/project/folder/ source ~/dev/module/fabric/venv-fabric/bin/activate && \ fab -f ../../module/fabric/release.py dist:prefix=kb,pypirc=dev && \ cd .
Or for the
source ~/dev/module/fabric/venv-fabric/bin/activate.fish; and fab -f ../../module/fabric/release.py dist:prefix=kb,pypirc=dev;
If this is the first time you have released this package then the upload will
fail. You need to run the following before running the
devpi login kb --password "123" # devpi use --set-cfg kb/dev devpi upload
see devpi for help with the above commands.
Don’t forget to commit your code to the version control system after running this task
Click here for Deploy instructions…
To check the contents of the release:
tar -ztvf dist/kb-app-name-0.0.16.tar.gz
The release process removes underscores from the package name, so if your
package is called
app_name it will be changed to
app-name. I don’t
really understand why this is necessary, but the following links might be
If you want to include data files in your release e.g.
name.json, then put
them in a
data folder inside an app folder in your project e.g:
Running the fabric
File "/usr/lib/python2.7/distutils/command/upload.py", line 70, in upload_file raise AssertionError("unsupported schema " + schema) AssertionError: unsupported schema Fatal error: local() encountered an error (return code 1) while executing 'python setup.py clean sdist upload -r dev'
To solve this issue, create your
~/.pypirc file. See .pypirc for