Artur Smęt
kontakt@artursmet.com
$ python setup.py sdist
$ python setup.py install
Instalacja pakietu
$ easy_install foo
$ easy_install requests
Searching for requests
Reading https://pypi.python.org/simple/requests/
Best match: requests 2.6.0
Downloading https://pypi.python.org/packages/source/r/requests/requests-2.6.0.tar.gz#md5=25287278fa3ea106207461112bb37050
Processing requests-2.6.0.tar.gz
Writing /tmp/easy_install-ukAPnp/requests-2.6.0/setup.cfg
Running requests-2.6.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ukAPnp/requests-2.6.0/egg-dist-tmp-WEqEXR
Adding requests 2.6.0 to easy-install.pth file
Installed /tmp/wrocpy/lib/python2.7/site-packages/requests-2.6.0-py2.7.egg
Processing dependencies for requests
Finished processing dependencies for requests
Instalacja pakietu
$ pip install foo
$ pip install requests
Downloading/unpacking requests
Downloading requests-2.6.0-py2.py3-none-any.whl (469kB): 469kB downloaded
Installing collected packages: requests
Successfully installed requests
Cleaning up...
#! /usr/bin/env python
from setuptools import setup, find_packages
setup(
name='helloworldtest',
author='John Doe',
author_email='john.doe@somecompany.com',
description="My beautiful library",
license='MIT',
version='0.1.0',
url='http://somecompany.com/',
packages=find_packages(),
include_package_data=True,
install_requires=[
'requests==2.6.0'
],
tests_require=[
'mock'
],
test_suite='helloworldtest.tests.suite',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
]
)
[wheel]
universal = 1
├── helloworldtest
│ └── __init__.py
├── __init__.py
├── LICENSE.txt
├── README.txt
├── setup.cfg
└── setup.py
prune static
graft templates
$ python setup.py sdist
$ python setup.py bdist_wheel
├── build
│ ├── bdist.linux-x86_64
│ └── lib.linux-x86_64-2.7
│ └── helloworldtest
│ └── __init__.py
├── dist
│ ├── helloworldtest-0.1.0-py2.py3-none-any.whl
│ └── helloworldtest-0.1.0.tar.gz
├── helloworldtest
│ └── __init__.py
├── helloworldtest.egg-info
│ ├── dependency_links.txt
│ ├── PKG-INFO
│ ├── requires.txt
│ ├── SOURCES.txt
│ └── top_level.txt
├── __init__.py
├── LICENSE.txt
├── README.txt
├── setup.cfg
└── setup.py
[distutils]
index-servers=
test
[test]
repository = https://testpypi.python.org/pypi
username = johndoe
password = somefancypassword
$ python setup.py register -r test
$ python setup.py sdist upload -r test
$ python setup.py bdist_wheel upload -r test