-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.py
58 lines (53 loc) · 1.71 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
#!/usr/bin/env python
import re
import os.path
from setuptools import setup, find_packages
setup_kwargs = {}
try:
setup_kwargs['long_description'] = open('README.rst').read()
except IOError:
# Use the create_readme_rst command to convert README to reStructuredText
pass
with open(os.path.join(os.path.dirname(__file__), "djxml", "__init__.py")) as f:
for line in f:
if m := re.search(r"""^__version__ = (['"])(.+?)\1$""", line):
version = m.group(2)
break
else:
raise LookupError("Unable to find __version__ in djxml/__init__.py")
setup(
name='django-xml',
version=version,
install_requires=[
'lxml',
'pytz',
'python-dateutil',
'Django>=2.2',
],
description="Provides an abstraction to lxml's XPath and XSLT " + \
"functionality in a manner resembling django database models",
author='The Atlantic',
author_email='[email protected]',
url='https://github.com/theatlantic/django-xml',
packages=find_packages(),
classifiers=[
'Environment :: Web Environment',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Framework :: Django',
'Framework :: Django :: 2.2',
'Framework :: Django :: 3.0',
'Framework :: Django :: 3.1',
'Framework :: Django :: 3.2',
],
include_package_data=True,
zip_safe=False,
entry_points={
'distutils.commands': [
'create_readme_rst = djxml.build:create_readme_rst',
],
},
**setup_kwargs)