Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

...

  1. Make sure you:
    1. Indicate a license type, AGPL or Apache (license). Link to which license you should use: /wiki/spaces/OPEN/pages/13959332
    2. Indicate which packages your package requires in order to run (install_requires)
    3. Use "edX" as the package author (author)
    4. Use "oscm@edx.org" as the package author's email address (author_email)
  2. A simple example is here.
  3. If your package includes console scripts, see this example.

...

  1. Create an account at https://testpypi.python.org/pypi.
  2. 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
languagebash
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

Filter by label (Content by label)
showLabelsfalse
max5
spacesOpenOPS
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ( "packaging" , "travis" , "pypi" ) and type = "page" and space = "OpenOPS"
labelspypi packaging travis

...