diff --git a/extras/win32-portable/create_portable.txt b/extras/win32-portable/create_portable.txt index 6213aafd6..5c5fa2c41 100644 --- a/extras/win32-portable/create_portable.txt +++ b/extras/win32-portable/create_portable.txt @@ -6,17 +6,11 @@ How to create a new portable Windows distribution of OpenSlides: easy_install -Z django django-mptt reportlab pil -2.) Install OpenSlides by running in the top directory: - - python setup.py install - - NOTE: This step must be repeated whenever you make changes to OpenSlides. - -3.) Run in the main directory of the OpenSlides checkout: +2.) Run in the main directory of the OpenSlides checkout: python extras\win32-portable\prepare_portable.py -4.) The portable OpenSlides distribution is now ready as a zip archive +3.) The portable OpenSlides distribution is now ready as a zip archive in the 'dist' directory diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index 04c1e0cc7..9418b8e10 100644 --- a/extras/win32-portable/prepare_portable.py +++ b/extras/win32-portable/prepare_portable.py @@ -18,8 +18,6 @@ import zipfile import distutils.ccompiler import distutils.sysconfig -from contextlib import nested - import pkg_resources sys.path.insert(0, os.getcwd()) @@ -80,10 +78,7 @@ SITE_PACKAGES = { "pil": { # NOTE: PIL is a special case, see copy_pil "copy": [], - }, - "openslides": { - "copy" : ["openslides"], - }, + } } PY_DLLS = [ @@ -297,9 +292,13 @@ def main(): raise os.makedirs(odir) + out_site_packages = os.path.join(odir, "site-packages") collect_lib(libdir, odir) - collect_site_packages(sitedir, os.path.join(odir, "site-packages")) + collect_site_packages(sitedir, out_site_packages) + + exclude = get_pkg_exclude("openslides") + copy_dir_exclude(exclude, ".", "openslides", out_site_packages) if not compile_openslides_launcher(): sys.stdout.write("Using prebuild openslides.exe\n")