mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Compare commits
5 commits
204bc6b5fa
...
490f8f2f25
Author | SHA1 | Date | |
---|---|---|---|
|
490f8f2f25 | ||
|
8a93f4ba13 | ||
|
cebd349e28 | ||
|
97106adf9a | ||
|
f8e2e88e04 |
3 changed files with 17 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -68,7 +68,7 @@ pretest:
|
||||||
python scripts/gen_individual_importing_tests.py
|
python scripts/gen_individual_importing_tests.py
|
||||||
|
|
||||||
TEST_ENV_PATH = "`pwd`:`pwd`/tests/lib"
|
TEST_ENV_PATH = "`pwd`:`pwd`/tests/lib"
|
||||||
TEST_ENV = PYTHONPATH=$(TEST_ENV_PATH) PERL5LIB=$(TEST_ENV_PATH)
|
TEST_ENV = PYTHONPATH="$$PYTHONPATH:"$(TEST_ENV_PATH) PERL5LIB="$$PERL5LIB:"$(TEST_ENV_PATH)
|
||||||
TEST_FILES = tests/style/*.t tests/unit-generated/*.py tests/individually-importing/*.py
|
TEST_FILES = tests/style/*.t tests/unit-generated/*.py tests/individually-importing/*.py
|
||||||
|
|
||||||
define RUN_TESTS
|
define RUN_TESTS
|
||||||
|
|
|
@ -32,7 +32,7 @@ PACKAGE = 'PySolFC'
|
||||||
TITLE = 'PySol'
|
TITLE = 'PySol'
|
||||||
PACKAGE_URL = 'http://pysolfc.sourceforge.net/'
|
PACKAGE_URL = 'http://pysolfc.sourceforge.net/'
|
||||||
|
|
||||||
VERSION_TUPLE = (2, 5, 5)
|
VERSION_TUPLE = (2, 6, 1)
|
||||||
VERSION = '.'.join(map(str, VERSION_TUPLE))
|
VERSION = '.'.join(map(str, VERSION_TUPLE))
|
||||||
|
|
||||||
# Tk windowing system (auto set up in init.py)
|
# Tk windowing system (auto set up in init.py)
|
||||||
|
|
|
@ -23,7 +23,13 @@
|
||||||
|
|
||||||
# imports
|
# imports
|
||||||
import os
|
import os
|
||||||
import site
|
try:
|
||||||
|
import site
|
||||||
|
except Exception:
|
||||||
|
class Dummy:
|
||||||
|
def __init__(self):
|
||||||
|
self.PREFIXES = []
|
||||||
|
site = Dummy()
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
# PySol imports
|
# PySol imports
|
||||||
|
@ -100,10 +106,17 @@ class DataLoader:
|
||||||
path.append(os.path.join(sys.path[0], "pysollib", "data"))
|
path.append(os.path.join(sys.path[0], "pysollib", "data"))
|
||||||
# from settings.py
|
# from settings.py
|
||||||
path.extend(DATA_DIRS)
|
path.extend(DATA_DIRS)
|
||||||
|
# py2app compatibility, see
|
||||||
|
# https://github.com/shlomif/PySolFC/issues/100
|
||||||
|
_prefixes = []
|
||||||
|
try:
|
||||||
|
_prefixes = site.PREFIXES
|
||||||
|
except Exception:
|
||||||
|
_prefixes = []
|
||||||
# itz 2018-10-21 in case of venv installation
|
# itz 2018-10-21 in case of venv installation
|
||||||
# (or even homedir installation), path[0] will be quite wrong.
|
# (or even homedir installation), path[0] will be quite wrong.
|
||||||
# Just directly use the location where setup.py puts the data.
|
# Just directly use the location where setup.py puts the data.
|
||||||
for pref in site.PREFIXES:
|
for pref in _prefixes:
|
||||||
path.append(os.path.join(pref, 'share', 'PySolFC'))
|
path.append(os.path.join(pref, 'share', 'PySolFC'))
|
||||||
# check path for valid directories
|
# check path for valid directories
|
||||||
self.path = []
|
self.path = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue