-
Notifications
You must be signed in to change notification settings - Fork 54
/
setup.py
executable file
·59 lines (53 loc) · 2.03 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
#!/usr/bin/env python
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# PyPi RST variant doesn't understand the 'code' tag. so replacing it
# with a regular quote
def rst_strip_code_tag(string):
return re.sub('^\\.\\. code:: .*', '::', string, flags=re.MULTILINE)
# Utility function to read the README file.
# To upload to PyPi, you need to have 'pypandoc'.
# Otherwise the readme will be clumsy.
try:
from pypandoc import convert
read_md = lambda fname: rst_strip_code_tag(
convert(os.path.join(os.path.dirname(__file__), fname), 'rst'))
except ImportError:
print("warning: pypandoc module not found," +
" could not convert Markdown to RST")
read_md = lambda fname: open(os.path.join(os.path.dirname(__file__),
fname), 'r').read()
setup(
name='artifactory',
version='0.1.17',
py_modules=['artifactory'],
license='MIT License',
description='A Python to Artifactory interface',
long_description=read_md('README.md'),
author='Konstantin Nazarov',
author_email='[email protected]',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Software Development :: Libraries',
'Topic :: System :: Filesystems',
],
url='http://github.com/parallels/artifactory',
download_url='http://github.com/parallels/artifactory',
install_requires=['requests', 'python-dateutil'] + ['pathlib'] if sys.version_info[0] < 3 or sys.version_info[1] < 4 else [],
zip_safe=False,
package_data={'': ['README.md']}
)