-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (54 loc) · 3.08 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
# coding: utf-8
# PyAuDiSam: Automation of Distance Sampling analyses with Distance software (http://distancesampling.org/)
# Copyright (C) 2021 Jean-Philippe Meuret
# This program is free software: you can redistribute it and/or modify it under the terms
# of the GNU 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 General Public License for more details.
# You should have received a copy of the GNU General Public License along with this program.
# If not, see https://www.gnu.org/licenses/.
# This script is for building the source and binary PyPI packages for pyaudisam:
# you can use the official python way (after installing the 'build' package):
# $ python -m build
# ... or the old way (should also work out of the box):
# $ python setup.py sdist bdist_wheel
import setuptools as sut
import pathlib as pl
import re
# The directory containing this file
here = pl.Path(__file__).parent
# Retrieve version from __init__.py
with open(here / 'pyaudisam' / '__init__.py') as file:
version = re.search(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', file.read()).group(1)
# Retrieve install_requires from requirements.txt
with open(here / 'README.md') as file:
long_desc = file.read()
# Retrieve install_requires from requirements.txt
with open(here / 'requirements.txt') as file:
requirements = file.read().splitlines()
# Retrieve extra_requires['test'] from test/requirements.txt
with open(here / 'tests/requirements.txt') as file:
# Skip first line "-r requirements.txt" present for direct pip install -r
test_requirements = file.read().splitlines()[1:]
# This call to setup() does all the final work !
sut.setup(name='pyaudisam', version=version, url='https://github.com/denmedius/pyaudisam',
description='Distance Sampling automation through python and Distance software',
long_description=long_desc, long_description_content_type='text/markdown',
author='denmedius', author_email='fefeqe22.vucuqu82@murena.io',
license='GPLv3+',
classifiers=['Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'Intended Audience :: Science/Research',
'Development Status :: 3 - Alpha',
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.9',
'Environment :: Win32 (MS Windows)'],
packages=['pyaudisam', 'pyaudisam.mcds', 'pyaudisam.report'],
include_package_data=True,
python_requires='>=3.9',
install_requires=requirements,
extras_require={'test': test_requirements},
entry_points={'console_scripts': []})