Uh oh!
There was an error while loading. Please reload this page.
This repository was archived by the owner on Jan 27, 2022. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.py
More file actions
Latest commit
84 lines (65 loc) · 2.21 KB
/
Copy pathsetup.py
File metadata and controls
84 lines (65 loc) · 2.21 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
78
79
80
81
82
83
84
#!/usr/bin/env python
# -*- coding: utf-8 -*-
importsys
importio
importos
fromsetuptoolsimportsetup, Command
fromshutilimportrmtree
HERE=os.path.abspath(os.path.dirname(__file__))
withio.open(os.path.join(HERE, "README.md"), encoding="utf-8") asf:
long_description="\n"+f.read()
classUploadCommand(Command):
"""
Support setup.py upload.
Based on, and thanks to, https://github.com/kennethreitz/setup.py/blob/master/setup.py
"""
description="Build and publish the package."
user_options= []
@staticmethod
defstatus(s):
"""Prints things in bold."""
print("\033[1m{0}\033[0m".format(s))
definitialize_options(self):
pass
deffinalize_options(self):
pass
defrun(self):
try:
self.status("Removing previous builds…")
rmtree(os.path.join(HERE, "dist"))
exceptOSError:
pass
self.status("Building Source and Wheel (universal) distribution…")
os.system("{0} setup.py sdist bdist_wheel --universal".format(sys.executable))
self.status("Uploading the package to PyPI via Twine…")
repo_arg= (
"--repository-url https://test.pypi.org/legacy/"
ifos.environ.get("PYPI_ENV") =="test"
else""
)
os.system("twine upload {} dist/*".format(repo_arg))
sys.exit()
setup(
name="stencila-schema",
version="1.16.1",
description="",
long_description=long_description,
long_description_content_type="text/markdown",
author="Stencila and contributors",
author_email="hello@stenci.la",
python_requires=">=3.6.0",
url="https://github.com/stencila/schema",
packages=["stencila.schema"],
extras_require={},
include_package_data=True,
license="Apache-2.0",
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
cmdclass={"upload": UploadCommand,},
)