forked from piskvorky/sqlitedict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·84 lines (63 loc) · 2.44 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This code is distributed under the terms and conditions
# from the Apache License, Version 2.0
#
# http://opensource.org/licenses/apache2.0.php
"""
Run with:
python ./setup.py install
"""
import os
import io
import subprocess
import setuptools.command.develop
from setuptools import setup
def read(fname):
path = os.path.join(os.path.dirname(__file__), fname)
return io.open(path, encoding='utf8').read()
class SetupDevelop(setuptools.command.develop.develop):
"""Docstring is overwritten."""
def run(self):
"""
Prepare environment for development.
- Ensures 'nose' and 'coverage.py' are installed for testing.
- Call super()'s run method.
"""
subprocess.check_call(('pip', 'install', 'nose', 'coverage'))
# Call super() (except develop is an old-style class, so we must call
# directly). The effect is that the development egg-link is installed.
setuptools.command.develop.develop.run(self)
SetupDevelop.__doc__ = setuptools.command.develop.develop.__doc__
setup(
name='sqlitedict',
version='2.0.0',
description='Persistent dict in Python, backed up by sqlite3 and pickle, multithread-safe.',
long_description=read('README.rst'),
py_modules=['sqlitedict'],
# there is a bug in python2.5, preventing distutils from using any non-ascii characters :(
# http://bugs.python.org/issue2562
author='Radim Rehurek, Victor R. Escobar, Andrey Usov, Prasanna Swaminathan, Jeff Quast',
author_email="me@radimrehurek.com",
maintainer='Radim Rehurek',
maintainer_email='me@radimrehurek.com',
url='https://github.com/piskvorky/sqlitedict',
download_url='http://pypi.python.org/pypi/sqlitedict',
keywords='sqlite, persistent dict, multithreaded',
license='Apache 2.0',
platforms='any',
classifiers=[ # from http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Database :: Front-Ends',
],
cmdclass={'develop': SetupDevelop},
)