Improve test of if openrem in path for use in virtualenv

Issue #73 resolved
Ed McDonagh created an issue

virtualenv name must not end in openrem else the routine for adding openrem to the path will be satisfied and won't do the job.

In the mean time, reference this in the install documentation

Comments (11)

  1. Ed McDonagh reporter

    This may only affect ptsizecsv2db as the other extractors use a different method.

    Propose change ptsizecsv2db to match the others and test.

  2. Ed McDonagh reporter

    All the scripts use the style of path manipulator seen in ptsizecsv2db as they cannot use the location of the running file to add openrem to the path. Need a better solution.

  3. Ed McDonagh reporter

    Replaced path manipulation routine in ptsizecsv2db with the call to openrem_settings used in the extractor programs. Removed the same code from the script and prefixed the import with openrem. Should work if site-packages is on the path. Refs #73.

    → <<cset 56b4ea8bd4db>>

  4. Ed McDonagh reporter

    Changed ptsizecsv2db to use the openrem_settings script the extractors use, and dropped the path manipulation code in the launcher scripts and replaced it with a prepended openrem on the import path, with the assumptiontion that site-packages (or dist-packages for a system wide debian install) will be on the python sys.path already. Fixes #73.

    → <<cset 24cb16a327dd>>

  5. Ed McDonagh reporter

    Removed the sys.path manipulation code from the import scripts again, as per 70888d1 and ref #73. This was reverted in fce9dd302bda and 15001b9222dd for #83 due to extraction scripts not functioning in virtualenv on linux. The existing code wouldn't work with debian installs due to assumption of site-packages instead of dist-packages. However, it seems that the correct thing to do would be to do: from openrem.remapp.extractors import rdsr, hence this commit. I think this will then break the openrem.settings finding, but this should be dealt with in the extractor codes, not here. We'll probably need to set the DJANGO_SETTINGS_MODULE to openrem.openrem.settings and then we'll not need the openrem_settings code at all. Refs #99.

    → <<cset 4220f2d82b54>>

  6. Log in to comment