Skip to main content

a demo package for NAD !

Project description

This is a demo to push a package on PyPi

Python project

Présentation des différents fichiers présents

Choose your distribution

on peut choisir entre distribute, setuptools, distutils ou Distutils2. Seule solution passe partout pour le moment c’est setuptools !

setup.py

Make your Package "user friendly"

  • init.py

The init.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later on the module search path. In the simplest case, init.py can just be an empty file, but it can also execute initialization code for the package or set the all variable, described later.

  • version

  • all

  • easy import functions

Test on local environment

  • pipdeptree

$ python setup.py install

Push on PyPi

  • Make sure you have the latest versions of setuptools and wheel installed:

    $ python3 -m pip install --user --upgrade setuptools wheel

  • Generating distribution archives

    $ python3 setup.py sdist bdist_wheel

  • Twine is a utility for interacting with PyPI, that offers a secure replacement for setup.py upload.

    $ python3 -m pip install --user --upgrade twine

  • upload all of the archives under dist:

    $ twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Installing new uploaded package

python3 -m pip install --index-url https://test.pypi.org/simple/ welovenad

Ressources

Getting started / simple project

https://packaging.python.org/tutorials/packaging-projects/

Building and Distributing Packages with Setuptools

https://setuptools.readthedocs.io/en/latest/setuptools.html

Packaging Python Projects

https://packaging.python.org/guides/distributing-packages-using-setuptools/

Repository BJC

https://github.com/BenJoyenConseil/pybbl

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

welovenad-1.0.0.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

welovenad-1.0.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page