forked from redcap-tools/PyCap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
82 lines (70 loc) · 2.44 KB
/
Copy pathsetup.py
File metadata and controls
82 lines (70 loc) · 2.44 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Scott Burns <scott.s.burns@gmail.com>"
__license__ = "MIT"
__copyright__ = "2014, Vanderbilt University"
import codecs
import os
import re
import sys
import warnings
if sys.version_info[0] < 3:
warnings.warn(
"Support Python 2 has been deprecated, and will be removed "
" in a future major release. Please upgrade to Python 3."
)
# Taken from vulture setup.py: https://github.com/jendrikseipp/vulture/blob/master/setup.py
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, *parts), "r") as f:
return f.read()
def find_version(*file_parts):
version_file = read(*file_parts)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
required = ["requests>=1.0.0", "semantic-version>=2.3.1"]
if os.path.exists("MANIFEST"):
os.remove("MANIFEST")
long_desc = open("README.rst").read() + "\n\n" + open("HISTORY.rst").read()
setup(
name="PyCap",
maintainer="Scott Burns",
maintainer_email="scott.s.burns@gmail.com",
description="""PyCap: Python interface to REDCap""",
license="MIT",
url="https://github.com/redcap-tools/PyCap",
version=find_version("redcap", "__init__.py"),
download_url="https://github.com/redcap-tools/PyCap",
long_description=long_desc,
long_description_content_type="text/x-rst",
packages=["redcap"],
install_requires=required,
extras_require={
"pandas": ["pandas>=0.25.0"],
# eg:
# 'rst': ['docutils>=0.11'],
# ':python_version=="2.6"': ['argparse'],
},
platforms="any",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"License :: OSI Approved",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
],
)