-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
77 lines (62 loc) · 2.11 KB
/
setup.py
File metadata and controls
77 lines (62 loc) · 2.11 KB
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
import setuptools
import os
import re
with open("README.md", "r") as fh:
long_description = fh.read()
def find_version(fnam, version="VERSION"):
with open(fnam) as f:
cont = f.read()
regex = f'{version}\s*=\s*["]([^"]+)["]'
match = re.search(regex, cont)
if match is None:
raise Exception(
f"version with spec={version} not found, use double quotes for version string"
)
return match.group(1)
def find_projectname():
cwd = os.getcwd()
name = os.path.basename(cwd)
return name
file = os.path.join("thonnycontrib", "gitonic", "__init__.py")
version = find_version(file)
projectname = find_projectname()
packages = setuptools.find_packages()
print(packages)
setuptools.setup(
name=projectname,
version=version,
author="k. goger",
author_email=f"k.r.goger+{projectname}@gmail.com",
description="manage a multi git workspace",
long_description=long_description,
long_description_content_type="text/markdown",
url=f"https://github.com/kr-g/{projectname}",
packages=packages,
license="AGPLv3+",
keywords="python utility shell git git-workspace tkinter thonny",
install_requires=[
"gitonic",
"thonny >= 3.3.0",
],
classifiers=[
"Development Status :: 3 - Alpha",
"Operating System :: POSIX :: Linux",
"Environment :: Console",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"Topic :: Utilities",
"Topic :: Desktop Environment",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
],
python_requires=">=3.8",
)
# !!!
# python3 patch_version.py
# !!!
# !!!deprecated!!! python3 -m setup sdist build bdist_wheel
# python3 -m setup build bdist_wheel
# twine upload --repository testpypi dist/*
# python3 -m pip install --index-url https://test.pypi.org/simple/ thonny-gitonic --extra-index-url https://pypi.org/simple/
# python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps thonny-gitonic
# twine upload dist/*