|
1
|
|
|
"""A setuptools based setup module. |
|
2
|
|
|
|
|
3
|
|
|
See: |
|
4
|
|
|
https://packaging.python.org/en/latest/distributing.html |
|
5
|
|
|
https://github.com/pypa/sampleproject |
|
6
|
|
|
""" |
|
7
|
|
|
|
|
8
|
|
|
# Always prefer setuptools over distutils |
|
9
|
|
|
from setuptools import setup, find_packages |
|
10
|
|
|
# To use a consistent encoding |
|
11
|
|
|
from codecs import open |
|
12
|
|
|
import os |
|
13
|
|
|
import re |
|
14
|
|
|
|
|
15
|
|
|
import versioneer |
|
16
|
|
|
import pypandoc |
|
17
|
|
|
from pypandoc.pandoc_download import download_pandoc |
|
18
|
|
|
|
|
19
|
|
|
try: |
|
20
|
|
|
download_pandoc() |
|
21
|
|
|
|
|
22
|
|
|
long_description = pypandoc.convert(source='README.md', to='rst', format='markdown_github') |
|
23
|
|
|
long_description = long_description.replace("\r","") |
|
24
|
|
|
except OSError as e: |
|
25
|
|
|
print("\n\n!!! pandoc not found !!!\n\n") |
|
26
|
|
|
import io |
|
27
|
|
|
# pandoc is not installed, fallback to using raw contents |
|
28
|
|
|
with io.open('README.md', encoding="utf-8") as f: |
|
29
|
|
|
long_description = f.read() |
|
30
|
|
|
|
|
31
|
|
|
setup( |
|
32
|
|
|
name='git-app-version', |
|
33
|
|
|
version=versioneer.get_version(), |
|
34
|
|
|
cmdclass=versioneer.get_cmdclass(), |
|
35
|
|
|
|
|
36
|
|
|
description='CLI tool to get Git commit informations and store them in a config file', |
|
37
|
|
|
long_description=long_description, |
|
38
|
|
|
|
|
39
|
|
|
# The project's main homepage. |
|
40
|
|
|
url='https://github.com/csanquer/git-app-version', |
|
41
|
|
|
|
|
42
|
|
|
# Author details |
|
43
|
|
|
author='Charles Sanquer', |
|
44
|
|
|
author_email='[email protected]', |
|
45
|
|
|
|
|
46
|
|
|
# Choose your license |
|
47
|
|
|
license='GPLv3', |
|
48
|
|
|
|
|
49
|
|
|
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers |
|
50
|
|
|
classifiers=[ |
|
51
|
|
|
# How mature is this project? Common values are |
|
52
|
|
|
# 3 - Alpha |
|
53
|
|
|
# 4 - Beta |
|
54
|
|
|
# 5 - Production/Stable |
|
55
|
|
|
'Development Status :: 4 - Beta', |
|
56
|
|
|
|
|
57
|
|
|
# Indicate who your project is intended for |
|
58
|
|
|
'Intended Audience :: Developers', |
|
59
|
|
|
'Topic :: Software Development :: Build Tools', |
|
60
|
|
|
|
|
61
|
|
|
# Pick your license as you wish (should match "license" above) |
|
62
|
|
|
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', |
|
63
|
|
|
|
|
64
|
|
|
# Specify the Python versions you support here. In particular, ensure |
|
65
|
|
|
# that you indicate whether you support Python 2, Python 3 or both. |
|
66
|
|
|
# 'Programming Language :: Python :: 2', |
|
67
|
|
|
# 'Programming Language :: Python :: 2.6', |
|
68
|
|
|
'Programming Language :: Python :: 2.7', |
|
69
|
|
|
# 'Programming Language :: Python :: 3', |
|
70
|
|
|
# 'Programming Language :: Python :: 3.2', |
|
71
|
|
|
'Programming Language :: Python :: 3.3', |
|
72
|
|
|
'Programming Language :: Python :: 3.4', |
|
73
|
|
|
'Programming Language :: Python :: 3.5', |
|
74
|
|
|
], |
|
75
|
|
|
|
|
76
|
|
|
# What does your project relate to? |
|
77
|
|
|
keywords='git version commit deploy tools', |
|
78
|
|
|
|
|
79
|
|
|
# You can just specify the packages manually here if your project is |
|
80
|
|
|
# simple. Or you can use find_packages(). |
|
81
|
|
|
packages=find_packages(), |
|
82
|
|
|
|
|
83
|
|
|
# Alternatively, if you want to distribute just a my_module.py, uncomment |
|
84
|
|
|
# this: |
|
85
|
|
|
# py_modules=["my_module"], |
|
86
|
|
|
|
|
87
|
|
|
# List run-time dependencies here. These will be installed by pip when |
|
88
|
|
|
# your project is installed. For an analysis of "install_requires" vs pip's |
|
89
|
|
|
# requirements files see: |
|
90
|
|
|
# https://packaging.python.org/en/latest/requirements.html |
|
91
|
|
|
install_requires=[ |
|
92
|
|
|
'future', |
|
93
|
|
|
'backports.csv', |
|
94
|
|
|
'configparser >= 3.5.0', |
|
95
|
|
|
'iso8601', |
|
96
|
|
|
'pyyaml', |
|
97
|
|
|
'pytz', |
|
98
|
|
|
'xmltodict', |
|
99
|
|
|
'tzlocal', |
|
100
|
|
|
'gitpython', |
|
101
|
|
|
'tabulate >= 0.7.0', |
|
102
|
|
|
'click >= 6.0' |
|
103
|
|
|
], |
|
104
|
|
|
|
|
105
|
|
|
# List additional groups of dependencies here (e.g. development |
|
106
|
|
|
# dependencies). You can install these using the following syntax, |
|
107
|
|
|
# for example: |
|
108
|
|
|
# $ pip install -e .[dev,test] |
|
109
|
|
|
extras_require={ |
|
110
|
|
|
'dev': [ |
|
111
|
|
|
'versioneer', |
|
112
|
|
|
'pypandoc', |
|
113
|
|
|
'check-manifest', |
|
114
|
|
|
'pyinstaller >=3.2' |
|
115
|
|
|
'pylint', |
|
116
|
|
|
'pep8', |
|
117
|
|
|
'yapf', |
|
118
|
|
|
'flake8', |
|
119
|
|
|
'isort' |
|
120
|
|
|
], |
|
121
|
|
|
'test': [ |
|
122
|
|
|
'pytest-cov', |
|
123
|
|
|
'pytest >=3.0', |
|
124
|
|
|
'mock', |
|
125
|
|
|
'tox' |
|
126
|
|
|
], |
|
127
|
|
|
}, |
|
128
|
|
|
|
|
129
|
|
|
# If there are data files included in your packages that need to be |
|
130
|
|
|
# installed, specify them here. If using Python 2.6 or less, then these |
|
131
|
|
|
# have to be included in MANIFEST.in as well. |
|
132
|
|
|
package_data={ |
|
133
|
|
|
'git_app_version': ['*.txt'], |
|
134
|
|
|
}, |
|
135
|
|
|
|
|
136
|
|
|
# Although 'package_data' is the preferred approach, in some case you may |
|
137
|
|
|
# need to place data files outside of your packages. See: |
|
138
|
|
|
# http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files # noqa |
|
139
|
|
|
# In this case, 'data_file' will be installed into '<sys.prefix>/my_data' |
|
140
|
|
|
# data_files=[('my_data', ['data/data_file'])], |
|
141
|
|
|
|
|
142
|
|
|
# To provide executable scripts, use entry points in preference to the |
|
143
|
|
|
# "scripts" keyword. Entry points provide cross-platform support and allow |
|
144
|
|
|
# pip to create the appropriate form of executable for the target platform. |
|
145
|
|
|
entry_points={ |
|
146
|
|
|
'console_scripts': [ |
|
147
|
|
|
'git-app-version=git_app_version.__main__:dump', |
|
148
|
|
|
], |
|
149
|
|
|
}, |
|
150
|
|
|
) |
|
151
|
|
|
|