forked from amcat/amcat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
51 lines (41 loc) · 1.73 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
import setuptools
from os import path
from pip.req import parse_requirements
from pip.download import PipSession
here = path.abspath(path.join(path.dirname(path.abspath(__file__))))
requirements_txt = path.join(here, "requirements.txt")
requirements = parse_requirements(requirements_txt, session=PipSession())
requirements = [str(ir.req) for ir in requirements]
# Ugly hack to get the version prior to installation, without having the amcat
# package depend on setup.py.
version = open(path.join(here, "amcat", "_version.py"), mode="r", encoding="ascii")
version = next(filter(lambda s: s.startswith("__version__"), version.readlines()))
version = version.split("=")[-1].strip().strip("'").strip('"')
# Package anything you can find, except for tests
packages = setuptools.find_packages(here, exclude=["*.tests"])
description = """
System for document management and analysis. The purpose of AmCAT is to
make it easier to conduct manual or automatic analyses of texts for (social)
scientific purposes. AmCAT can improve the use and standard of content
analysis in the social sciences and stimulate sharing data and analyses.
"""
def main():
setuptools.setup(
name="amcat",
packages=packages,
url='https://github.com/amcat/amcat',
license='GNU Affero GPL',
author='AmCAT Developers',
author_email='[email protected]',
description=(" ".join(description.split("\n"))).strip(),
install_requires=requirements,
setup_requires = [
"setuptools_git >= 0.3",
],
version=version,
# Fetches package data from git repository
include_package_data=True,
exclude_package_data = {'': ['tests/*']}
)
if __name__ == '__main__':
main()