parent
8d63f2bf93
commit
8ab0b5b4ac
@ -558,13 +558,12 @@ New PyQt release
|
|||||||
qutebrowser release
|
qutebrowser release
|
||||||
~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
* Make sure there are no unstaged changes.
|
* Make sure there are no unstaged changes and the tests are green.
|
||||||
* Run `src2asciidoc.py` and commit changes if necessary.
|
|
||||||
|
|
||||||
* Run `asciidoc2html.py`.
|
|
||||||
* Adjust `__version_info__` in `qutebrowser/__init__.py`.
|
* Adjust `__version_info__` in `qutebrowser/__init__.py`.
|
||||||
* Remove *(unreleased)* from changelog.
|
* Remove *(unreleased)* from changelog.
|
||||||
* Run all tests on all supported systems.
|
* Run tests again
|
||||||
|
* Run `asciidoc2html.py`.
|
||||||
* Commit
|
* Commit
|
||||||
|
|
||||||
* Create annotated git tag (`git tag -s "v0.X.Y" -m "Release v0.X.Y"`)
|
* Create annotated git tag (`git tag -s "v0.X.Y" -m "Release v0.X.Y"`)
|
||||||
@ -575,8 +574,7 @@ qutebrowser release
|
|||||||
* Mark the milestone at https://github.com/The-Compiler/qutebrowser/milestones
|
* Mark the milestone at https://github.com/The-Compiler/qutebrowser/milestones
|
||||||
as closed.
|
as closed.
|
||||||
|
|
||||||
* Build sdist: `python3 setup.py sdist --sign`
|
* Run `scripts/dev/build_release.py` on Linux to build an sdist
|
||||||
* Sign: `gpg --detach-sign -a dist/qutebrowser-0.X.Y.tar.gz`
|
|
||||||
* Upload to PyPI: `twine upload dist/foo{,.asc}`
|
* Upload to PyPI: `twine upload dist/foo{,.asc}`
|
||||||
* Create Windows packages via `scripts/dev/build_release.py` and upload.
|
* Create Windows packages via `scripts/dev/build_release.py` and upload.
|
||||||
|
|
||||||
|
@ -27,6 +27,9 @@ import os.path
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
import argparse
|
||||||
|
import tarfile
|
||||||
|
import collections
|
||||||
|
import shutil
|
||||||
|
|
||||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir,
|
||||||
os.pardir))
|
os.pardir))
|
||||||
@ -61,7 +64,7 @@ def call_freeze(*args, python=sys.executable):
|
|||||||
env=env)
|
env=env)
|
||||||
|
|
||||||
|
|
||||||
def build_common(args):
|
def run_asciidoc2html(args):
|
||||||
"""Common buildsteps used for all OS'."""
|
"""Common buildsteps used for all OS'."""
|
||||||
utils.print_title("Running asciidoc2html.py")
|
utils.print_title("Running asciidoc2html.py")
|
||||||
if args.asciidoc is not None:
|
if args.asciidoc is not None:
|
||||||
@ -87,6 +90,7 @@ def smoke_test(executable):
|
|||||||
|
|
||||||
def build_windows():
|
def build_windows():
|
||||||
"""Build windows executables/setups."""
|
"""Build windows executables/setups."""
|
||||||
|
utils.print_title("Building Windows binaries")
|
||||||
parts = str(sys.version_info.major), str(sys.version_info.minor)
|
parts = str(sys.version_info.major), str(sys.version_info.minor)
|
||||||
ver = ''.join(parts)
|
ver = ''.join(parts)
|
||||||
dotver = '.'.join(parts)
|
dotver = '.'.join(parts)
|
||||||
@ -142,6 +146,39 @@ def build_windows():
|
|||||||
qutebrowser.__version__), 'zip', destdir)
|
qutebrowser.__version__), 'zip', destdir)
|
||||||
|
|
||||||
|
|
||||||
|
def build_sdist():
|
||||||
|
"""Build an sdist and list the contents."""
|
||||||
|
utils.print_title("Building sdist")
|
||||||
|
|
||||||
|
shutil.rmtree('dist')
|
||||||
|
|
||||||
|
subprocess.check_call([sys.executable, 'setup.py', 'sdist'])
|
||||||
|
dist_files = os.listdir(os.path.abspath('dist'))
|
||||||
|
assert len(dist_files) == 1
|
||||||
|
|
||||||
|
dist_file = os.path.join('dist', dist_files[0])
|
||||||
|
subprocess.check_call(['gpg', '--detach-sign', '-a', dist_file])
|
||||||
|
|
||||||
|
tar = tarfile.open(dist_file)
|
||||||
|
by_ext = collections.defaultdict(list)
|
||||||
|
|
||||||
|
for tarinfo in tar.getmembers():
|
||||||
|
if not tarinfo.isfile():
|
||||||
|
continue
|
||||||
|
name = os.sep.join(tarinfo.name.split(os.sep)[1:])
|
||||||
|
_base, ext = os.path.splitext(name)
|
||||||
|
by_ext[ext].append(name)
|
||||||
|
|
||||||
|
assert '.pyc' not in by_ext
|
||||||
|
|
||||||
|
utils.print_title("sdist contents")
|
||||||
|
|
||||||
|
for ext, files in sorted(by_ext.items()):
|
||||||
|
utils.print_subtitle(ext)
|
||||||
|
print('\n'.join(files))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
"""Main entry point."""
|
"""Main entry point."""
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
@ -151,6 +188,7 @@ def main():
|
|||||||
metavar=('PYTHON', 'ASCIIDOC'))
|
metavar=('PYTHON', 'ASCIIDOC'))
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
utils.change_cwd()
|
utils.change_cwd()
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
if sys.maxsize > 2**32:
|
if sys.maxsize > 2**32:
|
||||||
# WORKAROUND
|
# WORKAROUND
|
||||||
@ -160,10 +198,10 @@ def main():
|
|||||||
print("See http://bugs.python.org/issue24493 and ")
|
print("See http://bugs.python.org/issue24493 and ")
|
||||||
print("https://github.com/pypa/virtualenv/issues/774")
|
print("https://github.com/pypa/virtualenv/issues/774")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
build_common(args)
|
run_asciidoc2html(args)
|
||||||
build_windows()
|
build_windows()
|
||||||
else:
|
else:
|
||||||
print("This script does nothing except on Windows currently.")
|
build_sdist()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
Loading…
Reference in New Issue
Block a user