A guide to publishing a package to NPM using Travis.
Info |
---|
This is a Work in Progress - modifying the pypi docs for NPM |
Step-by-step guide
...
- Make sure you:
- Indicate a license type, AGPL or Apache (
license
). Link to which license you should use: /wiki/spaces/OPEN/pages/13959332 - Indicate which packages your package requires in order to run (
install_requires
) - Use "edX" as the package author (
author
) - Use "oscm@edx.org" as the package author's email address (
author_email
)
- Indicate a license type, AGPL or Apache (
- A simple example is here.
- If your package includes console scripts, see this example.
...
- Create an account at https://testpypi.python.org/pypi.
- Follow the instructions in the guide linked above.
...
Install twine, build a kit, and upload it:
Code Block |
---|
pip install twine wheel
python setup.py sdist bdist_wheel
twine upload -u edX -p Q6GQT_THE_PASSWORD_6H8DF dist/* |
...
Contact DevOps to get credentials for the edX PyPI account. Use the Travis CI command line client to encrypt the password:
Code Block | ||
---|---|---|
| ||
travis encrypt --add deploy.password |
...
Info |
---|
Find your package at https://pypi.python.org/pypi/[package-name]/[version] |
Troubleshooting
If your tag is in GitHub, but is not starting a build in Travis, or if you are deploying from too many sub-builds in Travis, see the following changes to .travis.yml.These docs have been merged with How to connect a repository to Travis CI
Related articles
Filter by label (Content by label) | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...