-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup.py
68 lines (57 loc) · 1.88 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
import re
from setuptools import setup, Command
with open('django_uidfield/__init__.py', encoding='utf-8') as f:
version = re.search(r"__version__ = '(.*?)'", f.read()).group(1)
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
from django.conf import settings
settings.configure(
DATABASES={
'default': {
'NAME': ':memory:',
'ENGINE': 'django.db.backends.sqlite3',
},
'other': {
'NAME': ':memory:',
'ENGINE': 'django.db.backends.sqlite3',
},
},
INSTALLED_APPS=('django_uidfield', 'django.contrib.contenttypes'),
DEFAULT_AUTO_FIELD='django.db.models.AutoField',
)
from django.core.management import call_command
import django
django.setup()
call_command('test', 'django_uidfield')
setup(
name='django-uidfield',
version=version,
description='django-uidfield is a library which includes class '
'UIDField for models.',
long_description=open('README.rst').read(),
keywords='django model field',
license='MIT',
author='ivelum',
author_email='[email protected]',
url='https://github.com/ivelum/django-uidfield/',
install_requires=[
'django',
],
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Plugins',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
],
packages=['django_uidfield'],
include_package_data=True,
cmdclass={'test': TestCommand},
)