Skip to content

Commit 685d2ad

Browse files
committed
Add wheel support.
1 parent b7d13f2 commit 685d2ad

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

scripts/make-release.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
from datetime import datetime, date
1717
from subprocess import Popen, PIPE
1818

19+
try:
20+
import wheel
21+
except ImportError:
22+
wheel = None
1923

2024
_date_strip_re = re.compile(r'(?<=\d)(st|nd|rd|th)')
2125

@@ -88,7 +92,10 @@ def set_setup_version(version):
8892

8993

9094
def build_and_upload():
91-
Popen([sys.executable, 'setup.py', 'release', 'sdist', 'upload']).wait()
95+
cmd = [sys.executable, 'setup.py', 'release', 'sdist', 'upload']
96+
if wheel is not None:
97+
cmd.insert(4, 'bdist_wheel')
98+
Popen(cmd).wait()
9299

93100

94101
def fail(message, *args):
@@ -140,6 +147,10 @@ def main():
140147
if not git_is_clean():
141148
fail('You have uncommitted changes in git')
142149

150+
if wheel is None:
151+
print ('Warning: You need to install the wheel package '
152+
'to upload a wheel distribution.')
153+
143154
set_init_version(version)
144155
set_setup_version(version)
145156
make_git_commit('Bump version number to %s', version)

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[wheel]
2+
universal = 1
3+
14
[egg_info]
25
tag_build = dev
36
tag_date = true

0 commit comments

Comments
 (0)