-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
51 lines (46 loc) · 1.6 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import setuptools
from pathlib import Path
name = 'bout_install'
root_path = Path(__file__).parent
init_path = root_path.joinpath(name, '__init__.py')
readme_path = root_path.joinpath('README.md')
# https://packaging.python.org/guides/single-sourcing-package-version/
with init_path.open('r') as f:
version_file = f.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
version = version_match.group(1)
else:
raise RuntimeError('Unable to find version string.')
with readme_path.open('r') as f:
long_description = f.read()
setuptools.setup(
name=name,
version=version,
author='Michael Løiten',
author_email='[email protected]',
description='Python package to install BOUT++ and its dependencies',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/CELMA-project/bout_install',
packages=setuptools.find_packages(),
keywords=['bout++', 'bout', 'installation', 'plasma', 'turbulence'],
install_requires=['requests>=2.20.1'],
package_data={
# Include all .ini files
'': ['*.ini']
},
classifiers=[
'Programming Language :: Python :: 3',
('License :: OSI Approved :: '
'GNU Lesser General Public License v3 or later (LGPLv3+)'),
'Operating System :: OS Independent',
],
entry_points={'console_scripts': [
'bout_install = bout_install.main:bout_install_command_line'
]},
)