Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
weboob
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Seigne
weboob
Commits
c319ce1e
Commit
c319ce1e
authored
Dec 24, 2018
by
Laurent Bachelier
🐧
Committed by
Romain Bignon
Dec 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
release: Build universal wheel archive
parent
a469c93d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
11 deletions
+27
-11
release.py
release.py
+22
-11
setup.cfg
setup.cfg
+5
-0
No files found.
release.py
View file @
c319ce1e
...
...
@@ -9,7 +9,8 @@ from subprocess import check_call
WORKTREE
=
'release_tmp'
OPTIONS
=
[
'--qt'
,
'--xdg'
]
def
make_tarball
(
tag
):
def
make_tarball
(
tag
,
wheel
):
# Create and enter a temporary worktree
if
os
.
path
.
isdir
(
WORKTREE
):
check_call
([
'git'
,
'worktree'
,
'remove'
,
'--force'
,
WORKTREE
])
...
...
@@ -17,21 +18,30 @@ def make_tarball(tag):
assert
os
.
path
.
isdir
(
WORKTREE
)
os
.
chdir
(
WORKTREE
)
check_call
([
sys
.
executable
,
'setup.py'
]
+
OPTIONS
+
[
'sdist'
,
'--keep'
,
'--dist-dir'
,
'../dist'
])
check_call
([
sys
.
executable
,
'setup.py'
]
+
OPTIONS
+
[
'sdist'
,
'--keep'
,
'--dist-dir'
,
'../dist'
])
if
wheel
:
check_call
([
sys
.
executable
,
'setup.py'
]
+
OPTIONS
+
[
'bdist_wheel'
,
'--keep'
,
'--dist-dir'
,
'../dist'
])
# Clean up the temporary worktree
os
.
chdir
(
os
.
pardir
)
check_call
([
'git'
,
'worktree'
,
'remove'
,
'--force'
,
WORKTREE
])
assert
not
os
.
path
.
isdir
(
WORKTREE
)
tarball
=
'dist/weboob-
%
s.tar.gz'
%
tag
if
os
.
path
.
exists
(
tarball
):
print
(
'Generated tarball:
%
s'
%
tarball
)
print
(
'To upload to PyPI, run: twine upload -s
%
s'
%
tarball
)
else
:
raise
Exception
(
'Generated tarball not found at
%
s'
%
tarball
)
files
=
[
'dist/weboob-
%
s.tar.gz'
%
tag
]
if
wheel
:
files
.
append
(
'dist/weboob-
%
s-py2.py3-none-any.whl'
%
tag
)
for
f
in
files
:
if
not
os
.
path
.
exists
(
f
):
raise
Exception
(
'Generated file not found at
%
s'
%
f
)
else
:
print
(
'Generated file:
%
s'
%
f
)
print
(
'To upload to PyPI, run: twine upload -s
%
s'
%
' '
.
join
(
files
))
if
__name__
==
'__main__'
:
...
...
@@ -40,8 +50,9 @@ if __name__ == '__main__':
tarball_parser
=
subparsers
.
add_parser
(
'tarball'
)
tarball_parser
.
add_argument
(
'tag'
)
tarball_parser
.
add_argument
(
'--no-wheel'
,
action
=
'store_false'
,
dest
=
'wheel'
)
tarball_parser
.
set_defaults
(
mode
=
'tarball'
)
args
=
parser
.
parse_args
()
if
args
.
mode
==
'tarball'
:
make_tarball
(
args
.
tag
)
make_tarball
(
args
.
tag
,
args
.
wheel
)
setup.cfg
View file @
c319ce1e
...
...
@@ -36,3 +36,8 @@ group = root
[bdist]
owner = root
group = root
[bdist_wheel]
owner = root
group = root
universal = 1
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment