-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
70 lines (57 loc) · 2.83 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
68
69
70
#!/usr/bin/env python
import sys
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
with open('requirements.txt') as f:
requirements = f.read().splitlines()
requirements = [req.replace('==', '>=') for req in requirements]
with open('extras-requirements.txt') as f:
extras_requirements = f.read().splitlines()
extras_requirements = [req.replace('==', '>=') for req in extras_requirements]
# read branch input and remove it from sys.argv
if '--branch' in sys.argv:
index = sys.argv.index('--branch')
sys.argv.pop(index)
branch = sys.argv.pop(index)
else:
branch = 'master'
name = 'pollination-irradiance'
if branch == 'viz':
name = f'{name}.viz'
elif branch == 'express':
name = f'{name}.express'
def _clean_version():
"""Make sure the version will not be a local version."""
def get_version(version):
tag = str(version.tag)
return tag
def empty(version):
return ''
return {'local_scheme': get_version, 'version_scheme': empty}
# normal setuptool inputs
setuptools.setup(
name=name, # will be used for package name
author='pollination', # the owner account for this package - required if pushed to Pollination
author_email='[email protected]',
packages=setuptools.find_namespace_packages( # required - that's how pollination find the package
include=['pollination.*'], exclude=['tests', '.github']
),
install_requires=requirements,
extras_require={'viz': extras_requirements},
use_scm_version=_clean_version,
setup_requires=['setuptools_scm'],
url='https://github.com/pollination/irradiance', # will be translated to home
project_urls={
'icon': 'https://raw.githubusercontent.com/ladybug-tools/artwork/master/icons_components/honeybee/png/annualirrrecipe.png',
'docker': 'https://hub.docker.com/r/ladybugtools/honeybee-radiance'
},
description='Annual irradiance recipe for Pollination.', # will be used as package description
long_description=long_description, # will be translated to ReadMe content on Pollination
long_description_content_type="text/markdown",
maintainer='mostapha, ladybug-tools', # Package maintainers. For multiple maintainers use comma
maintainer_email='[email protected], [email protected]',
keywords='honeybee, radiance, ladybug-tools, daylight, annual-irradiance',# will be used as keywords
license='PolyForm Shield License 1.0.0, https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt', # the license link should be separated by a comma
zip_safe=False
)