From b4a4d15a7f3f886ba6e9553eca41130cc748fd76 Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Sun, 18 Nov 2012 14:21:11 +0100 Subject: [PATCH 1/3] Revert "Treat openslides the same way as other packages" This reverts commit 14ba868df4ca9b62bb99499532271109c2e4c998. --- extras/win32-portable/prepare_portable.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index 04c1e0cc7..574a4cfba 100644 --- a/extras/win32-portable/prepare_portable.py +++ b/extras/win32-portable/prepare_portable.py @@ -45,6 +45,10 @@ LIBEXCLUDE = [ r"^unittest/", ] +OPENSLIDES_EXCLUDE = [ + r"^openslides/settings.py" +] + SITE_PACKAGES = { "django": { @@ -80,10 +84,7 @@ SITE_PACKAGES = { "pil": { # NOTE: PIL is a special case, see copy_pil "copy": [], - }, - "openslides": { - "copy" : ["openslides"], - }, + } } PY_DLLS = [ @@ -301,6 +302,9 @@ def main(): collect_lib(libdir, odir) collect_site_packages(sitedir, os.path.join(odir, "site-packages")) + exclude = get_pkg_exclude("openslides", OPENSLIDES_EXCLUDE) + copy_dir_exclude(exclude, ".", "openslides", odir) + if not compile_openslides_launcher(): sys.stdout.write("Using prebuild openslides.exe\n") From 720a993259acf6f82c4722bd59636c154d8687e0 Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Sun, 18 Nov 2012 14:38:22 +0100 Subject: [PATCH 2/3] Copy openslides from local checkout to site-packages We reverted to using the checkout instead of an installed openslides version when building the portable, but we still want openlides to be placed together with all the other packages --- extras/win32-portable/prepare_portable.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/extras/win32-portable/prepare_portable.py b/extras/win32-portable/prepare_portable.py index 574a4cfba..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()) @@ -45,10 +43,6 @@ LIBEXCLUDE = [ r"^unittest/", ] -OPENSLIDES_EXCLUDE = [ - r"^openslides/settings.py" -] - SITE_PACKAGES = { "django": { @@ -298,12 +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", OPENSLIDES_EXCLUDE) - copy_dir_exclude(exclude, ".", "openslides", odir) + 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") From 073c98d6b1bf4255073e194e4546fd528cef777f Mon Sep 17 00:00:00 2001 From: Andy Kittner Date: Thu, 22 Nov 2012 00:29:20 +0100 Subject: [PATCH 3/3] Remove note about installing openslides before building the portable --- extras/win32-portable/create_portable.txt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) 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