Giter Site home page Giter Site logo

packagetemplate's Introduction

PackageTemplate

I list here some instructions to create and upload a Python package, that can be download and installed using pip. I follow closely what reported in https://betterscientificsoftware.github.io/python-for-hpc/tutorials/python-pypi-packaging/.

Things to do

  1. Put all of the code inside the <package_name> directory;
  2. Fill in details on version, properties etc. in both setup.py and <package_name>/__init__.py;
  3. In the main directory here, try pip-installing locally pip install . and ensure it works;
  4. Check everything is fine with your setup python setup.py check;
  5. If the previous point did not raise any error, create the distribution python setup.py sdist. You will find a tar.gz file (the one you will eventually upload) in dist/;
  6. To facilitate uploading pip install twine;
  7. Upload to test.pypi first twine upload --repository-url https://test.pypi.org/legacy/ dist/*. This is useful to check everything is running smoothly before going in "production";
  8. Pip-install from the test environment pip install --index-url https://test.pypi.org/simple/ <package_name> --user. Check that it works locally;
  9. At this point, you are ready to go: twine upload dist/*

There you go! Now you can pip install <package_name>!

packagetemplate's People

Contributors

giacomopiccinini avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.