-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
58 lines (51 loc) · 1.66 KB
/
setup.py
File metadata and controls
58 lines (51 loc) · 1.66 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#! /usr/bin/env python3
import os
from os import path
import shutil
name = "clams-python"
cmdclass = {}
with open("VERSION", 'r') as version_f:
version = version_f.read().strip()
with open('README.md') as readme:
long_desc = readme.read()
with open('requirements.txt') as requirements:
requires = requirements.readlines()
ver_pack_dir = path.join('clams', 'ver')
shutil.rmtree(ver_pack_dir, ignore_errors=True)
os.makedirs(ver_pack_dir, exist_ok=True)
init_mod = open(path.join(ver_pack_dir, '__init__.py'), 'w')
init_mod.write(f'__version__ = "{version}"')
init_mod.close()
import setuptools
setuptools.setup(
name=name,
version=version,
author="Brandeis Lab for Linguistics and Computation",
author_email="admin@clams.ai",
description="A collection of APIs to develop CLAMS app for python",
long_description=long_desc,
long_description_content_type="text/markdown",
url="https://clams.ai",
license="Apache-2.0",
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Flask',
'Framework :: Pytest',
'Intended Audience :: Developers',
'Programming Language :: Python :: 3 :: Only',
],
cmdclass=cmdclass,
# this is for *building*, building (build, bdist_*) doesn't get along with MANIFEST.in
# so using this param explicitly is much safer implementation
package_data={
'clams': ['develop/templates/**/*', 'develop/templates/**/.*']
},
install_requires=requires,
python_requires='>=3.10',
packages=setuptools.find_packages(),
entry_points={
'console_scripts': [
'clams = clams.__init__:cli',
],
},
)