This repository has been archived by the owner on Jun 4, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
86 lines (71 loc) · 2.27 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import io
import re
from setuptools import setup, find_packages
RE_BADGE = re.compile(r'^\[\!\[(?P<text>.*?)\]\[(?P<badge>.*?)\]\]\[(?P<target>.*?)\]$', re.M)
BADGES_TO_KEEP = []
def md(filename):
'''
Load .md (markdown) file and sanitize it for PyPI.
'''
content = io.open(filename).read()
for match in RE_BADGE.finditer(content):
if match.group('badge') not in BADGES_TO_KEEP:
content = content.replace(match.group(0), '')
return content
def pip(filename):
"""Parse pip reqs file and transform it to setuptools requirements."""
return open(os.path.join('requirements', filename)).readlines()
long_description = '\n'.join((
md('README.md'),
md('CHANGELOG.md'),
''
))
install_requires = pip('install.pip')
tests_require = pip('test.pip')
kerberos_require = pip('kerberos.pip')
setup(
name='udata-ldap',
version=__import__('udata_ldap').__version__,
description=__import__('udata_ldap').__description__,
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/opendatateam/udata-ldap',
author='Open Data Team',
author_email='[email protected]',
packages=find_packages(),
include_package_data=True,
python_requires='==2.7.*',
install_requires=install_requires,
setup_requires=['setuptools>=38.6.0'],
tests_require=tests_require,
extras_require={
'test': tests_require,
'kerberos': kerberos_require,
},
entry_points={
'udata.commands': [
'ldap = udata_ldap.commands:ldap',
],
'udata.plugins': [
'ldap = udata_ldap',
],
},
license='MIT',
zip_safe=False,
keywords='udata LDAP',
classifiers=[
'Development Status :: 3 - Alpha',
'Programming Language :: Python',
'Environment :: Web Environment',
'Operating System :: OS Independent',
'Intended Audience :: Developers',
'Topic :: System :: Software Distribution',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules',
],
)