-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsetup.py
99 lines (94 loc) · 2.69 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup
from crosspm import config
build_number = os.getenv('GITHUB_RUN_NUMBER', '0')
branch = os.getenv('GITHUB_REF_NAME', '')
is_gh_actions = os.getenv('CI') == 'true'
version = config.__version__.split('.')
develop_status = '4 - Beta'
url = 'http://devopshq.github.io/crosspm'
if is_gh_actions:
version = version[0:3]
if branch == 'master':
develop_status = '5 - Production/Stable'
version.append(build_number)
else:
version.append('{}{}'.format('dev' if branch == 'develop' else branch, build_number))
else:
if len(version) < 4:
version.append('dev0')
version = '.'.join(version)
if is_gh_actions:
with open('crosspm/config.py', 'w', encoding="utf-8") as f:
f.write("__version__ = '{}'".format(version))
with open('README.md', encoding="utf-8") as f:
long_description = f.read()
setup(
name='crosspm',
version=version,
description='Cross Package Manager',
license='MIT',
author='Alexander Kovalev',
author_email='ak@alkov.pro',
url=url,
long_description=long_description,
download_url='https://github.com/devopshq/crosspm.git',
entry_points={'console_scripts': ['crosspm=crosspm.__main__:main']},
python_requires='>=3.8.0',
classifiers=[
'Development Status :: {}'.format(develop_status),
'Environment :: Console',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
keywords=[
'development',
'dependency',
'requirements',
'manager',
'versioning',
'packet',
],
packages=[
'crosspm',
'crosspm.helpers',
'crosspm.adapters',
'crosspm.template',
],
setup_requires=[
'wheel==0.34.2',
'pypandoc==1.5',
],
tests_require=[
"pytest>=5.2",
"pytest-flask>=1.0.0",
"PyYAML>=6.0",
],
install_requires=[
"requests>=2.30.0,<3.0.0",
'urllib3>=2.2.0',
'docopt==0.6.2',
"PyYAML>=6.0",
"dohq-artifactory>=0.8.3",
"Jinja2>=3.1.3",
'patool==1.12', # need for pyunpack
'pyunpack==0.2',
],
package_data={
'': [
'./template/*.j2',
'*.cmake',
'../LICENSE',
# '../README.*',
],
},
)