This repository has been archived by the owner on Apr 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
63 lines (55 loc) · 1.97 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
import os
import sys
import re
from setuptools import setup
from setuptools.command.test import test as TestCommand
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def get_version():
vfile = os.path.join(
os.path.dirname(__file__), "lib", "sapmap", "_version.py")
with open(vfile, "r") as vfh:
vline = vfh.read()
vregex = r"^__version__ = ['\"]([^'\"]*)['\"]"
match = re.search(vregex, vline, re.M)
if match:
return match.group(1)
else:
raise RuntimeError("Unable to find version string in {}.".format(vfile))
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
errno = pytest.main(self.test_args)
sys.exit(errno)
setup(
name="sapmap",
version=get_version(),
author="Tim Welch",
author_email="[email protected]",
description="Generate Spatial Access Priority (SAP) maps from response data",
license="BSD",
keywords="gis geospatial geographic raster vector zonal statistics",
url="https://github.com/seasketch/python-sap-map",
package_dir={'': 'lib'},
packages=['sapmap'],
long_description=read('README.md'),
install_requires=read('requirements.txt').splitlines(),
tests_require=read('requirements_dev.txt').splitlines(),
cmdclass={'test': PyTest},
classifiers=[
"Development Status :: 4 - Beta",
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
"License :: OSI Approved :: BSD License",
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
"Topic :: Utilities",
'Topic :: Scientific/Engineering :: GIS',
])