forked from France-Travail/words_n_fun
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
67 lines (62 loc) · 2.37 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
65
66
67
# Copyright (C) <2018-2022> <Agence Data Services, DSI Pôle Emploi>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
import os
from setuptools import setup
# Get package directory
package_directory = os.path.dirname(os.path.abspath(__file__))
# Get package version (env variable or verion file + -local)
version_path = os.path.join(package_directory, 'version.txt')
with open(version_path, 'r') as version_file:
version = version_file.read().strip()
version = os.getenv('VERSION') or f"{version}-local"
# Get package description
readme_path = os.path.join(package_directory, 'README.md')
with open(readme_path, 'r') as readme_file:
long_description = readme_file.read()
# Setup
setup(
name='words_n_fun',
version=version,
packages=['words_n_fun', 'words_n_fun.preprocessing'],
license='AGPL-3.0',
long_description=long_description,
long_description_content_type='text/markdown',
author='Agence Data Services PE Nantes',
description="Semantic library of the Data Services agency",
url="https://github.com/OSS-Pole-Emploi/words_n_fun",
platforms=['windows', 'linux'],
package_data={
'words_n_fun': ['configs/*.json', 'nltk_data/corpora/stopwords/french']
},
include_package_data=True,
install_requires=[
'pandas>=1.3.5,<1.5',
'numpy>=1.19.5,<1.22',
'nltk>=3.4.5,<3.7',
'tqdm>=4.62.2,<5.', # https://github.com/tqdm/tqdm/issues/780
'simplejson>=3.17.0,<3.17.3',
'requests>=2.23.0,<3.',
'ftfy>=5.8,<6.',
],
extras_require={
"lemmatizer": [
"spacy==3.3.1",
"markupsafe>=2.0.1,<2.2",
"Cython>=0.29.24,<1.",
"fr-core-news-sm==3.3.0"
]
}
# pip install words_n_fun || pip install words_n_fun[lemmatizer]
)