This repository was archived by the owner on Jun 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathsetup.py
More file actions
42 lines (36 loc) · 1.29 KB
/
setup.py
File metadata and controls
42 lines (36 loc) · 1.29 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
import setuptools
import setuptools.command.install
from pathlib import Path
class PostInstallCommand(setuptools.command.install.install):
"""Post-installation command."""
def run(self):
setuptools.command.install.install.run(self)
try:
import spacy
spacy.cli.validate()
except ModuleNotFoundError:
pass
with open(Path(__file__).resolve().parent.joinpath('README.md'), 'r') as fh:
long_description = fh.read()
with open(Path(__file__).resolve().parent.joinpath('requirements.txt'), 'r') as fh:
requirements = [r.split('#', 1)[0].strip() for r in fh.read().split('\n')]
with open(Path(__file__).resolve().parent.joinpath('VERSION'), 'r') as fh:
version = fh.read()
setuptools.setup(
name='textpipe',
version=version,
description='textpipe: clean and extract metadata from text',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/textpipe/textpipe',
packages=setuptools.find_packages(),
classifiers=[
'Programming Language :: Python :: 3.6',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
install_requires=requirements,
cmdclass={
'install': PostInstallCommand,
},
)