-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
64 lines (56 loc) · 2.18 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
from setuptools import setup
# Available at setup time due to pyproject.toml
from pybind11.setup_helpers import Pybind11Extension, build_ext
from pybind11 import get_cmake_dir
from os import path
import sys
def read(rel_path):
with open(path.join(path.abspath(path.dirname(__file__)), rel_path), 'r') as f:
return f.read()
def get_version(rel_path):
for line in read(rel_path).splitlines():
if line.startswith('__version__'):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
def get_long_desc(rel_path):
with open(path.join(path.abspath(path.dirname(__file__)), rel_path), 'r', encoding="utf-8") as f:
return f.read()
__version__ = get_version("patentpy/__init__.py")
ext_modules = [
Pybind11Extension("convert_funcs",
["src/convert_funcs.cpp", "src/wrapper.cpp"],
cxx_std=11,
define_macros = [('VERSION_INFO', __version__)],
),
]
setup(
name = "patentpy",
version = __version__,
author = "James Yu, Raoul Wadhwa, Hayley Beltz, Milind Y. Desai, Jacob G. Scott, Peter Erdi",
author_email = "jyu140@jhu.edu",
description = "A project taking USPTO bulk patent data and converting it to rectangular format",
long_description = get_long_desc('README.md'),
long_description_content_type = "text/markdown",
url = "https://github.com/JYProjs/patentpy",
packages = ["patentpy"],
ext_modules = ext_modules,
install_requires = ["pandas", "lxml", "tqdm"],
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: C++",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Intended Audience :: Information Technology",
"Intended Audience :: Legal Industry",
"Natural Language :: English",
"Topic :: Utilities",
"Topic :: Text Processing :: General",
"Topic :: Text Processing :: Markup :: XML",
],
license = "MIT",
zip_safe = False,
python_requires = ">=3.7",
)