-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathsetup.py
More file actions
59 lines (51 loc) · 1.92 KB
/
Copy pathsetup.py
File metadata and controls
59 lines (51 loc) · 1.92 KB
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
# import multiprocessing to avoid this bug (http://bugs.python.org/issue15881#msg170215)
import multiprocessing
assert multiprocessing
import re
from setuptools import setup, find_packages
def get_version():
"""
Extracts the version number from the version.py file.
"""
VERSION_FILE = 'dynamic_initial_data/version.py'
mo = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', open(VERSION_FILE, 'rt').read(), re.M)
if mo:
return mo.group(1)
else:
raise RuntimeError('Unable to find version string in {0}.'.format(VERSION_FILE))
def get_lines(file_path):
return open(file_path, 'r').read().split('\n')
install_requires = get_lines('requirements/requirements.txt')
tests_require = get_lines('requirements/requirements-testing.txt')
setup(
name='django-dynamic-initial-data',
version=get_version(),
description='Dynamic initial data fixtures for Django apps',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/ambitioninc/django-dynamic-initial-data',
author='',
author_email='opensource@ambition.com',
keywords='Django fixtures',
packages=find_packages(),
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Programming Language :: Python :: 3.14',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Framework :: Django',
'Framework :: Django :: 5.2',
'Framework :: Django :: 6.0',
],
license='MIT',
python_requires='>=3.10',
install_requires=install_requires,
tests_require=tests_require,
test_suite='run_tests.run_tests',
include_package_data=True,
)