As you all may know pip is a python package manager and everyone has worked with it to install python libs.
Some of the commands with pip that you may not know about it:
- freeze: output installed packages in requirements format. (you can grep and search for a specific package):
- list: list installed packages:
- show: Show information about installed packages:
Important note for devops: pip by default install a stable version of the package. If you need to install an unstable version of the package (latest version) use
If you want to manage your custom python repository package versions (RC, Alpha, Beta, Stable, etc) add
The important part is
To see list of
https://pypi.python.org/pypi?%3Aaction=list_classifiers
Now you can give versioning like
To see different classifiers see the link
https://pypi.python.org/pypi/Django
#django #pip #pre_release #freeze #package #python #devops
Some of the commands with pip that you may not know about it:
- freeze: output installed packages in requirements format. (you can grep and search for a specific package):
rply==0.7.4
rsa==3.2.3
sasl==0.2.1
scipy==0.13.0b1
- list: list installed packages:
tcpwatch (1.3.1)
telebot (0.0.3)
thrift (0.9.3)
- show: Show information about installed packages:
$ pip show pandas
Name: pandas
Version: 0.17.0
Summary: Powerful data structures for data analysis, time series,and statistics
Home-page: http://pandas.pydata.org
Author: The PyData Development Team
Author-email: pydata@googlegroups.com
License: BSD
Location: /Library/Python/2.7/site-packages
Requires: numpy, python-dateutil, pytz
Important note for devops: pip by default install a stable version of the package. If you need to install an unstable version of the package (latest version) use
--pre
flag to install pre-release package.If you want to manage your custom python repository package versions (RC, Alpha, Beta, Stable, etc) add
classifiers
to your setup.py script like below:setup(...,
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Environment :: Web Environment',
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Python Software Foundation License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python',
'Topic :: Communications :: Email',
'Topic :: Office/Business',
'Topic :: Software Development :: Bug Tracking',
],
)
The important part is
Development Status :: 4 - Beta
, which for stable release you would use Development Status :: 5 - Production/Stable
.To see list of
pypi
Development Status values read from the below link:https://pypi.python.org/pypi?%3Aaction=list_classifiers
Now you can give versioning like
Django 2.0b1
(for pre release) and Django 1.11.6
for stable release.To see different classifiers see the link
Django
link below to learn more:https://pypi.python.org/pypi/Django
#django #pip #pre_release #freeze #package #python #devops