Skip to content

Commit b10c5a1

Browse files
committed
pkgproj from jinja template
1 parent abc5882 commit b10c5a1

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

Diff for: osnap/installer.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,21 @@ def make_installer(author, application_name, description='', url='', project_pac
8484
os.chmod(os.path.join(macos_dir, 'launch'), 0o777)
8585

8686
# make dmg
87-
with ['hdiutil', 'create', '-volname', application_name, '-srcfolder', os.path.abspath('dist'), '-ov',
88-
'-format', 'UDZO', application_name + '.dmg'] as dmg_command:
89-
dmg_command = ' '.join(dmg_command)
90-
if verbose:
91-
print('%s' % str(dmg_command))
92-
subprocess.check_call(dmg_command, shell=True)
87+
dmg_command = ['hdiutil', 'create', '-volname', application_name, '-srcfolder', os.path.abspath('dist'), '-ov',
88+
'-format', 'UDZO', application_name + '.dmg']
89+
dmg_command = ' '.join(dmg_command)
90+
if verbose:
91+
print('%s' % str(dmg_command))
92+
subprocess.check_call(dmg_command, shell=True)
9393

9494
# make pkg based installer
9595
pkgproj_path = application_name + '.pkgproj'
96-
with [os.path.join(os.sep, 'usr', 'local', 'bin', 'packagesbuild'), pkgproj_path] as pkgproj_command:
97-
osnap.make_pkgproj.make_prkproj(application_name, pkgproj_path, verbose)
98-
pkgproj_command = ' '.join(pkgproj_command)
99-
if verbose:
100-
print('%s' % str(pkgproj_command))
101-
subprocess.check_call(pkgproj_command, shell=True)
96+
pkgproj_command = [os.path.join(os.sep, 'usr', 'local', 'bin', 'packagesbuild'), pkgproj_path]
97+
osnap.make_pkgproj.make_prkproj(application_name, pkgproj_path, verbose)
98+
pkgproj_command = ' '.join(pkgproj_command)
99+
if verbose:
100+
print('%s' % str(pkgproj_command))
101+
subprocess.check_call(pkgproj_command, shell=True)
102102

103103
elif osnap.util.is_windows():
104104

Diff for: test_example/make_venv.sh

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ fi
88
echo ${MYPYTHONHOME}
99
${MYPYTHONHOME}/bin/pyvenv --clear venv
1010
./venv/bin/pip3 install requests
11+
./venv/bin/pip3 install jinja2
1112
# install osnap
1213
pushd .
1314
cd ..

Diff for: test_example/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
appdirs
2+
jinja2
23
PyQt5
34
cryptography
45
# we don't really need sqlalchemy but its a good test

0 commit comments

Comments
 (0)