forked from tooledesign/pybna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
49 lines (45 loc) · 1.46 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
import os, pathlib
from setuptools import setup, find_packages
from distutils.util import convert_path
root = str(pathlib.Path(__file__).parent.absolute())
def read(fname,dir=None):
if dir is None:
return open(os.path.join(root, fname)).read()
else:
return open(os.path.join(root, dir, fname)).read()
# get data files
def package_files(directory,exts):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
base, ext = os.path.splitext(filename)
if ext in exts:
paths.append(os.path.join('..', path, filename))
return paths
main_ns = {}
ver_path = convert_path("pybna/_version.py")
with open(ver_path) as ver_file:
exec(ver_file.read(), main_ns)
setup(
name="pybna",
version=main_ns["__version__"],
author="Spencer Gardner",
url="https://github.com/tooledesign/pybna",
description="A library for measuring bike network connectivity using PeopleForBikes' Bicycle Network Analysis methodology",
long_description=read('README.md'),
long_description_content_type="text/markdown",
packages=find_packages(include=["pybna","pybna.*"]),
package_data={"": package_files(root,[".csv",".xlsx",".sql",".yaml",".zip"])},
install_requires=[
"packaging",
"pandas",
"geopandas",
"psycopg2-binary",
"munch",
"PyYAML",
"tqdm",
"osmnx",
"overpass",
"xlrd"
]
)