-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
69 lines (57 loc) · 2.45 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# Read in long_description from README.rst. By using a separate file, instead
# of translating README.md, we can use different content on PyPI than on
# GitHub.
with open('README.rst') as readme_file:
long_description = readme_file.read()
# As PyPI only accepts PEP 440 non-local version strings, we need to strip
# down the version generated for non-tagged commits.
def version_config():
import os
from setuptools_scm.version import postrelease_version
if os.environ.get('TRAVIS_TAG'):
return {'version_scheme': postrelease_version}
# Use a version like 1.1.0.54 for commit with distance 54 from v1.1.0 tag
def version_scheme(version):
return postrelease_version(version).replace('post', '')
def local_scheme(version):
return ''
return {'version_scheme': version_scheme, 'local_scheme': local_scheme}
setup(
# Name of project, see PEP 426
name='XD-Docker',
# Short and long descriptions, will be displayed on PyPI.
description='Python library for accessing Docker Remote API',
long_description=long_description,
url='https://github.com/XD-embedded/xd-docker',
author='Esben Haabendal',
author_email='[email protected]',
license='MIT',
# Version number, see PEP 440
use_scm_version=version_config,
classifiers=[
# How mature is this project? Common values are
# 3 - Alpha
# 4 - Beta
# 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Indicate who your project is intended for
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
# Pick your license as you wish (should match "license" above)
'License :: OSI Approved :: MIT License',
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords='docker',
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
# Run-time dependencies
install_requires=['requests', 'requests-unixsocket', 'typing'],
# Dependencies needed for setup.py to run
setup_requires=['setuptools_scm'],
)