Skip to content

Commit 04aa088

Browse files
committed
Merge branch 'v2'
2 parents 2401d52 + 4193d70 commit 04aa088

File tree

85 files changed

+3601
-641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3601
-641
lines changed

.appveyor/build.ps1 renamed to .build/.appveyor/build.ps1

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ if ($env:python.endswith("36-x64")) {
1515
pip uninstall -y enum34
1616
}
1717

18-
make 2>&1
18+
make $env:BUILD_TARGET 2>&1
1919
dir dist
2020
mkdir release
21-
cp dist\user-sync.pex release\
22-
cd release\
23-
Get-Command python
24-
$pyver=$(python -V 2>&1) -replace "Python ","py" -replace "\.",""
25-
echo "pyver: ${pyver}"
26-
7z a -ttar "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar" user-sync.pex
27-
7z a -tgzip "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar.gz" "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.tar"
28-
7z a "user-sync-${env:APPVEYOR_REPO_TAG_NAME}-win64-${pyver}.zip" user-sync.pex
21+
22+
cp dist\user-sync.exe release\
23+
cd release
24+
7z a "user-sync-${env:APPVEYOR_REPO_TAG_NAME}${env:BUILD_EDITION}-win64.zip" user-sync.exe
2925
cd ..
3026
7z a -ttar -r release\examples.tar examples
3127
7z a -tgzip release\examples.tar.gz release\examples.tar
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
# -----------------------------------------------------------------------------
3+
# Copyright (c) 2013-2018, PyInstaller Development Team.
4+
#
5+
# Distributed under the terms of the GNU General Public License with exception
6+
# for distributing bootloader.
7+
#
8+
# The full license is in the file COPYING.txt, distributed with this software.
9+
# -----------------------------------------------------------------------------
10+
11+
# Temporary implementation until this PR is merged:
12+
# https://github.com/pyinstaller/pyinstaller/pull/3948/files
13+
14+
# See also https://github.com/jaraco/keyring/issues/324
15+
16+
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
17+
18+
hiddenimports = collect_submodules('keyrings.cryptfile.cryptfile')
19+
20+
# keyring uses entrypoints to read keyring.backends from metadata file entry_points.txt.
21+
datas = copy_metadata('keyrings.cryptfile')
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/usr/bin/env bash
22
virtualenv venv -p /usr/bin/python3.6
33
source venv/bin/activate
4+
python -m pip install --upgrade pip
45
pip install external/okta-0.0.3.1-py2.py3-none-any.whl
56
pip install -e .
67
pip install -e .[test]
78
pip install -e .[setup]
89
pip uninstall -y enum34
9-
make
10+
make $BUILD_TARGET
1011
pwd
11-
.travis/release.sh
12+
.build/.travis/release.sh
1213
python setup.py test

.travis/build-py36.sh renamed to .build/.travis/build-py36.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ pip install -e .
44
pip install -e .[test]
55
pip install -e .[setup]
66
pip uninstall -y enum34
7-
make
7+
make $BUILD_TARGET
File renamed without changes.
File renamed without changes.

.build/.travis/release.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
cd dist
3+
tar czf "user-sync-${TRAVIS_TAG}${BUILD_EDITION}-${IMG}.tar.gz" user-sync
4+
cd ..
5+
mkdir -p release
6+
mv dist/*.tar.gz release/
7+
ls -al release/

.build/hook-keyring.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# -----------------------------------------------------------------------------
2+
# Copyright (c) 2013-2018, PyInstaller Development Team.
3+
#
4+
# Distributed under the terms of the GNU General Public License with exception
5+
# for distributing bootloader.
6+
#
7+
# The full license is in the file COPYING.txt, distributed with this software.
8+
# -----------------------------------------------------------------------------
9+
10+
# Temporary implementation until this PR is merged:
11+
# https://github.com/pyinstaller/pyinstaller/pull/3948/files
12+
13+
# See also https://github.com/jaraco/keyring/issues/324
14+
15+
from PyInstaller.utils.hooks import collect_submodules, copy_metadata
16+
17+
hiddenimports = collect_submodules('keyring.backends')
18+
19+
# keyring uses entrypoints to read keyring.backends from metadata file entry_points.txt.
20+
datas = copy_metadata('keyring')

.build/pre_build.py

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,34 @@
1+
# Copyright (c) 2016-2017 Adobe Inc. All rights reserved.
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
121
import os
222
import shutil
23+
from backports import configparser
324

425

526
def cd():
627
os.chdir(os.path.realpath(os.path.join(os.path.dirname(__file__), '..')))
728

829

9-
def bundle_example_config():
10-
examples_dir = os.path.join('examples', 'config files - basic')
30+
def bundle_example_config(subdir):
31+
examples_dir = os.path.join('examples', subdir)
1132
files = [os.path.join(examples_dir, f) for f in os.listdir(examples_dir) if
1233
os.path.isfile(os.path.join(examples_dir, f))]
1334
bundle_dir = os.path.join('user_sync', 'resources', 'examples')
@@ -18,6 +39,29 @@ def bundle_example_config():
1839
shutil.copy(f, dest)
1940

2041

42+
def bundle_feature_flag_config():
43+
default_cfg_path = os.path.join('user_sync', 'resources', 'default_flags.cfg')
44+
default_cfg = configparser.ConfigParser()
45+
default_cfg.optionxform = str
46+
default_cfg.read(default_cfg_path)
47+
48+
flag_data = {}
49+
50+
for k, v in default_cfg.items('config'):
51+
env_val = os.environ.get(k)
52+
if env_val is not None:
53+
flag_data[k] = env_val
54+
else:
55+
flag_data[k] = v
56+
57+
with open(os.path.join('user_sync', 'resources', 'flags.cfg'), 'w') as flag_cfg_file:
58+
flag_cfg = configparser.ConfigParser()
59+
flag_cfg.optionxform = str
60+
flag_cfg['config'] = flag_data
61+
flag_cfg.write(flag_cfg_file)
62+
63+
2164
if __name__ == '__main__':
2265
cd()
23-
bundle_example_config()
66+
bundle_example_config('config files - basic')
67+
bundle_example_config('sign')

0 commit comments

Comments
 (0)