Skip to main content

Pip packaging tutorial package

Project description

Pip packaging process

1 - verify environnent

python -V
  Python 2.7.17

python -m pip --version
  pip 19.3.1 from /home/jeec6230/.local/lib/python2.7/site-packages/pip (python 2.7)

2 - Install the required packages

sudo python -m pip install --upgrade pip setuptools wheel
sudo python -m pip install tqdm
sudo python -m pip install --user --upgrade twine

3 - Create an executable file without extension named as your project name

touch pip_packaging
chmod +x pip_packaging

4 - Edit this file and type in :

#!/usr/bin/env python

echo "hey there, this is my first pip package"

5 - Create a setup file setup.py

It will contain all your package metadata information.

import setuptools

with open("README.md", "r") as fh:
    long_description = fh.read()


setuptools.setup(
    name='pip_packaging',  
    version='0.1',
    scripts=['pip_packaging'] ,
    author="Firstname Lastname",
    author_email="firstname.lastname@somwhere.org",
    description="Pip packaging tutorial package",
    long_description=long_description,
long_description_content_type="text/markdown",
    url="https://github.com/fnlastname/pip_packaging",
    packages=setuptools.find_packages(),
    classifiers=[
        "Programming Language :: Python :: 3",
        "License :: OSI Approved :: MIT License",
        "Operating System :: OS Independent",
    ],
)

6 - Compile your package

While in your repository execute the following command :

python setup.py bdist_wheel

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pip_packaging-0.1-py2-none-any.whl (2.3 kB view details)

Uploaded Python 2

File details

Details for the file pip_packaging-0.1-py2-none-any.whl.

File metadata

  • Download URL: pip_packaging-0.1-py2-none-any.whl
  • Upload date:
  • Size: 2.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.22.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.17

File hashes

Hashes for pip_packaging-0.1-py2-none-any.whl
Algorithm Hash digest
SHA256 10a6492b57fd932f5be85c6707400a83977247dd2725370d25212a0964412469
MD5 64e98a4ecada0f394eb65da02c5533e3
BLAKE2b-256 58dbfb9579e9c04ab6f4a7dab49f7ece5f8fe6a1ee705f1b783d6a2208000edc

See more details on using hashes here.

Supported by

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