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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
"""\
important note:
the setup of setuptools_scm is self-using,
the first execution of `python setup.py egg_info`
will generate partial data
its critical to run `python setup.py egg_info`
once before running sdist or easy_install on a fresh checkouts
pip usage is recommended
"""
from __future__ import print_function
import os
import sys
import setuptools
PROBLEMATIC_COMMANDS = 'install', 'develop', 'easy_install', 'bdist_egg'
if not os.path.isdir('setuptools_scm.egg-info'):
print(__doc__)
if any(c in sys.argv for c in PROBLEMATIC_COMMANDS):
sys.exit('please run `python setup.py egg_info` first')
def scm_config():
from setuptools_scm.version import (
guess_next_dev_version,
get_local_node_and_date,
)
return dict(
version_scheme=guess_next_dev_version,
local_scheme=get_local_node_and_date,
)
with open('README.rst') as fp:
long_description = fp.read()
arguments = dict(
name='setuptools-scm',
url='http://bitbucket.org/pypa/setuptools_scm/',
# pass here since entrypints are not yet registred
use_scm_version=scm_config,
author='Ronny Pfannschmidt',
author_email='opensource@ronnypfannschmidt.de',
description=('the blessed package to manage your versions by scm tags'),
long_description=long_description,
license='MIT',
packages=[
'setuptools_scm',
],
entry_points={
'distutils.setup_keywords': [
'use_scm_version = setuptools_scm:setuptools_version_keyword'
],
'setuptools.file_finders': [
'setuptools_scm = setuptools_scm:find_files',
],
'setuptools_scm.parse_scm': [
'.hg = setuptools_scm.hg:parse',
'.git = setuptools_scm.git:parse',
'.hg_archival.txt = setuptools_scm.hg:parse_archival',
'PKG-INFO = setuptools_scm.hacks:parse_pkginfo',
],
'setuptools_scm.files_command': [
'.hg = setuptools_scm.hg:FILES_COMMAND',
'.git = setuptools_scm.git:FILES_COMMAND',
],
'setuptools_scm.version_scheme': [
'guess-next-dev = setuptools_scm.version:guess_next_dev_version',
'post-release = setuptools_scm.version:postrelease_version',
],
'setuptools_scm.local_scheme': [
'node-and-date = setuptools_scm.version:get_local_node_and_date',
'dirty-tag = setuptools_scm.version:get_local_dirty_tag',
],
},
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Version Control',
'Topic :: System :: Software Distribution',
'Topic :: Utilities',
],
)
if __name__ == '__main__':
setuptools.setup(**arguments)
|