Skip to content

Commit

Permalink
Release 3.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
htgoebel committed Jul 9, 2019
2 parents 0f31b35 + ac4deb0 commit 498e6ee
Show file tree
Hide file tree
Showing 796 changed files with 4,345 additions and 2,448 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ runw_d -text
*.dll -text

/PyInstaller/utils/_gitrevision.py ident export-subst
# Tests relay on fixed \n line end
/tests/unit/test_modulegraph/testdata/test.txt text eol=lf
2 changes: 2 additions & 0 deletions .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ schedule: "every month"

requirements:
- tests/requirements-libraries.txt
- tests/requirements-tools.txt:
update: False

pr_prefix: "Tests: Requirements:"
label_prs: tests/ci/pyup
Expand Down
90 changes: 39 additions & 51 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
language: python

# Use the new container-based Travis infrastructure.
sudo: false

branches:
except:
- /pyup\/.*/

# Make sure we are on Ubuntu 14.04
dist: trusty
# Make sure we are on Ubuntu 16.04. This fixes the following error, which
# appears on Trusty (Ubuntu 14.04) when testing Linux Python 3.5 and 3.6 with
# PyQt5 5.12: ``relocation error: /tmp/_MEIFdpiBr/libQt5DBus.so.5: symbol
# dbus_message_get_allow_interactive_authorization, version LIBDBUS_1_3 not
# defined in file libdbus-1.so.3 with link time reference``.
dist: xenial

# Cache pip packages. Explicitly name the pip-cache directory since we
# use a custom `install` step which annuls `cache: pip`.
Expand All @@ -20,6 +21,10 @@ cache:
os:
- linux

services:
# PyQt5 tests require a GUI. See https://docs.travis-ci.com/user/gui-and-headless-browsers/#using-services-xvfb.
- xvfb

jobs:
fast_finish: true
include:
Expand All @@ -28,30 +33,35 @@ jobs:
# in a stage.
- stage: Test - PyInstaller
os: osx
language: generic
python: 3.7
language: minimal
cache:
directories:
- $HOME/Library/Caches/pip
script: &script-test-pyinstaller
# Run tests and speed them up by sending them to multiple CPUs.
# -n 3
# Run tests and speed them up by sending them to multiple CPUs.
#
# --maxfail 3
# End tests after 3 failures.
#
# --durations 10
# Print the 10 longest tests; see
# https://docs.pytest.org/en/latest/usage.html#profiling-test-execution-duration
- >
py.test -n 3 --maxfail 3
py.test -n 3 --maxfail 3 --durations 10
tests/unit tests/functional
--ignore=tests/functional/test_libraries.py
--ignore=tests/functional/test_hooks
--ignore tests/functional/test_libraries.py
- stage: Test - Libraries
os: osx
language: generic
python: 3.7
language: minimal
cache:
directories:
- $HOME/Library/Caches/pip
script: &script-test-libraries
- >
py.test -n 3 --maxfail 3
tests/functional/test_libraries.py tests/functional/test_hooks
py.test -n 3 --maxfail 3 --durations 10
tests/functional/test_libraries.py
- &test-pyinstaller
stage: Test - PyInstaller
Expand All @@ -61,12 +71,6 @@ jobs:
- &test-libraries
stage: Test - Libraries
python: 2.7
before_script: &start-xvfb
- |
# Run X Virtual Framebuffer to imitate a display
export DISPLAY=:99.0 ;
sh -e /etc/init.d/xvfb start ;
sleep 3 # give xvfb some time to start
# Run tests and speed them up by sending them to multiple CPUs.
script: *script-test-libraries

Expand All @@ -80,11 +84,6 @@ jobs:
flake8-diff -v -v -v $TRAVIS_BRANCH || travis_terminate 1;
fi
- <<: *test-pyinstaller
python: 3.4
- <<: *test-libraries
python: 3.4

- <<: *test-pyinstaller
python: 3.5
- <<: *test-libraries
Expand All @@ -98,26 +97,17 @@ jobs:
python: 3.6

# Building Python > 3.7 requires OpenSSL 1.0.2 (or 1.1), which is
# available in xenial (16.04 LTS) only. As of 2018-07-08 xenial is only
# available as VM (sudo: true)
# available in xenial (16.04 LTS) only.

- <<: *test-pyinstaller
python: 3.7
dist: xenial
sudo: true
- <<: *test-libraries
python: 3.7
dist: xenial
sudo: true

- <<: *test-pyinstaller
python: nightly
dist: xenial
sudo: true
- <<: *test-libraries
python: nightly
dist: xenial
sudo: true

allow_failures:
# Just tests how PyInstaller performs with upcoming Python
Expand All @@ -135,22 +125,24 @@ addons:
# SciPy dependencies.
- gfortran
- libatlas-base-dev
# Per https://www.riverbankcomputing.com/pipermail/pyqt/2019-February/041363.html,
# PyQt5 5.12 needs a library not installed by default.
- libxkbcommon-x11-0

before_install:
# Skip build if the commit message contains [skip travis] or [travis skip]
- >
echo "$TRAVIS_COMMIT_MESSAGE"
| grep -E '\[(skip travis|travis skip)\]'
&& echo "[skip travis] has been found, exiting."
&& exit 0 || true
# See https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-macos.
homebrew:
packages:
- python
# Update to Python 3.7 via homebrew.
# Disabled, since this takes a HUGE amount of test time.
#update: true

# Perform the manual steps on osx to install python3 and activate venv
before_install:
# Activate a venv to ensure we're using the correct Python interpreter.
# Per http://steven.casagrande.io/articles/travis-ci-and-if-statements/,
# ensure the build fails for statements in an ``if`` clause.
- >
if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
brew update || travis_terminate 1;
brew upgrade python || brew install python || travis_terminate 1;
python3 -m venv venv || travis_terminate 1;
source venv/bin/activate;
fi
Expand All @@ -160,11 +152,7 @@ install:
- python -m pip install -U pip setuptools wheel | cat

# Install dependencies for tests.
- pip install --progress-bar=off -U -r tests/requirements-tools.txt
- >
if [[ $TRAVIS_BUILD_STAGE_NAME == 'Test - libraries' ]] ; then
pip install --progress-bar=off -U -r tests/requirements-libraries.txt || travis_terminate 1
fi
- pip install --progress-bar=off -U -r tests/requirements-tools.txt -r tests/requirements-libraries.txt

# Compile bootloader
- cd bootloader
Expand Down
2 changes: 1 addition & 1 deletion COPYING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
================================


Copyright (c) 2010-2018, PyInstaller Development Team
Copyright (c) 2010-2019, PyInstaller Development Team
Copyright (c) 2005-2009, Giovanni Bajo
Based on previous work under copyright (c) 2002 McMillan Enterprises, Inc.

Expand Down
10 changes: 5 additions & 5 deletions PyInstaller/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2018, PyInstaller Development Team.
# Copyright (c) 2005-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
Expand All @@ -20,7 +20,7 @@

# Note: Keep this variable as plain string so it could be updated automatically
# when doing a release.
__version__ = '3.4'
__version__ = '3.5'


# Absolute path of this package's directory. Save this early so all
Expand Down Expand Up @@ -77,8 +77,8 @@
DEFAULT_WORKPATH = os.path.join(compat.getcwd(), 'build')


PLATFORM = compat.system() + '-' + compat.architecture()
PLATFORM = compat.system + '-' + compat.architecture
# Include machine name in path to bootloader for some machines.
# e.g. 'arm'
if compat.machine():
PLATFORM += '-' + compat.machine()
if compat.machine:
PLATFORM += '-' + compat.machine
2 changes: 1 addition & 1 deletion PyInstaller/__main__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2018, PyInstaller Development Team.
# Copyright (c) 2013-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
Expand Down
2 changes: 1 addition & 1 deletion PyInstaller/archive/pyz_crypto.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2018, PyInstaller Development Team.
# Copyright (c) 2005-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
Expand Down
2 changes: 1 addition & 1 deletion PyInstaller/archive/readers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2018, PyInstaller Development Team.
# Copyright (c) 2013-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
Expand Down
2 changes: 1 addition & 1 deletion PyInstaller/archive/writers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2018, PyInstaller Development Team.
# Copyright (c) 2005-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
Expand Down
Binary file modified PyInstaller/bootloader/Windows-32bit/run.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-32bit/run_d.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-32bit/runw.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-32bit/runw_d.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-64bit/run.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-64bit/run_d.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-64bit/runw.exe
Binary file not shown.
Binary file modified PyInstaller/bootloader/Windows-64bit/runw_d.exe
Binary file not shown.
33 changes: 28 additions & 5 deletions PyInstaller/building/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2018, PyInstaller Development Team.
# Copyright (c) 2005-2019, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
Expand Down Expand Up @@ -154,7 +154,7 @@ class PKG(Target):
'DEPENDENCY': 'd'}

def __init__(self, toc, name=None, cdict=None, exclude_binaries=0,
strip_binaries=False, upx_binaries=False):
strip_binaries=False, upx_binaries=False, upx_exclude=None):
"""
toc
A TOC (Table of Contents)
Expand All @@ -181,6 +181,7 @@ def __init__(self, toc, name=None, cdict=None, exclude_binaries=0,
self.exclude_binaries = exclude_binaries
self.strip_binaries = strip_binaries
self.upx_binaries = upx_binaries
self.upx_exclude = upx_exclude or []
# This dict tells PyInstaller what items embedded in the executable should
# be compressed.
if self.cdict is None:
Expand All @@ -202,6 +203,7 @@ def __init__(self, toc, name=None, cdict=None, exclude_binaries=0,
('exclude_binaries', _check_guts_eq),
('strip_binaries', _check_guts_eq),
('upx_binaries', _check_guts_eq),
('upx_exclude', _check_guts_eq)
# no calculated/analysed values
)

Expand Down Expand Up @@ -255,7 +257,8 @@ def assemble(self):
seenFnms_typ[fnm] = typ

fnm = checkCache(fnm, strip=self.strip_binaries,
upx=(self.upx_binaries and (is_win or is_cygwin)),
upx=self.upx_binaries,
upx_exclude=self.upx_exclude,
dist_nm=inm)

mytoc.append((inm, fnm, self.cdict.get(typ, 0),
Expand Down Expand Up @@ -349,6 +352,7 @@ def __init__(self, *args, **kwargs):
self.manifest = kwargs.get('manifest', None)
self.resources = kwargs.get('resources', [])
self.strip = kwargs.get('strip', False)
self.upx_exclude = kwargs.get("upx_exclude", [])
self.runtime_tmpdir = kwargs.get('runtime_tmpdir', None)
# If ``append_pkg`` is false, the archive will not be appended
# to the exe, but copied beside it.
Expand Down Expand Up @@ -419,9 +423,16 @@ def __init__(self, *args, **kwargs):
self.toc.append(("pyi-windows-manifest-filename " + manifest_filename,
"", "OPTION"))

if self.versrsrc:
if not os.path.isabs(self.versrsrc):
# relative version-info path is relative to spec file
self.versrsrc = os.path.join(
CONF['specpath'], self.versrsrc)

self.pkg = PKG(self.toc, cdict=kwargs.get('cdict', None),
exclude_binaries=self.exclude_binaries,
strip_binaries=self.strip, upx_binaries=self.upx,
upx_exclude=self.upx_exclude
)
self.dependencies = self.pkg.dependencies

Expand Down Expand Up @@ -503,6 +514,7 @@ def _bootloader_file(self, exe, extension=None):
return bootloader_file

def assemble(self):
from ..config import CONF
logger.info("Building EXE from %s", self.tocbasename)
trash = []
if os.path.exists(self.name):
Expand Down Expand Up @@ -530,6 +542,8 @@ def assemble(self):
except ValueError:
pass
resfile = res[0]
if not os.path.isabs(resfile):
resfile = os.path.join(CONF['specpath'], resfile)
restype = resname = reslang = None
if len(res) > 1:
restype = res[1]
Expand Down Expand Up @@ -568,6 +582,8 @@ def assemble(self):
logger.error("Error while updating resource %s %s in %s"
" from data file %s",
restype, resname, tmpnm, resfile, exc_info=1)
if is_win and self.manifest and not self.exclude_binaries:
self.manifest.update_resources(tmpnm, [1])
trash.append(tmpnm)
exe = tmpnm

Expand Down Expand Up @@ -641,6 +657,7 @@ def __init__(self, *args, **kws):
from ..config import CONF
Target.__init__(self)
self.strip_binaries = kws.get('strip', False)
self.upx_exclude = kws.get("upx_exclude", [])
self.console = True

if CONF['hasUPX']:
Expand Down Expand Up @@ -703,10 +720,16 @@ def assemble(self):
os.makedirs(todir)
if typ in ('EXTENSION', 'BINARY'):
fnm = checkCache(fnm, strip=self.strip_binaries,
upx=(self.upx_binaries and (is_win or is_cygwin)),
upx=self.upx_binaries,
upx_exclude=self.upx_exclude,
dist_nm=inm)
if typ != 'DEPENDENCY':
shutil.copy(fnm, tofnm)
if os.path.isdir(fnm):
# beacuse shutil.copy2() is the default copy function
# for shutil.copytree, this will also copy file metadata
shutil.copytree(fnm, tofnm)
else:
shutil.copy(fnm, tofnm)
try:
shutil.copystat(fnm, tofnm)
except OSError:
Expand Down

0 comments on commit 498e6ee

Please sign in to comment.