Changeset ff97458 in sasmodels


Ignore:
Timestamp:
Apr 28, 2016 4:31:25 AM (9 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
a6ffaa8, 3ecf034
Parents:
fb69211
git-author:
Piotr Rozyczko <piotr.rozyczko@…> (04/28/16 04:28:37)
git-committer:
Piotr Rozyczko <piotr.rozyczko@…> (04/28/16 04:31:25)
Message:

Precompiled models are a Windows-only feature.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kerneldll.py

    rfb69211 rff97458  
    9090    COMPILE = "cc -shared -fPIC -fopenmp -std=c99 -O2 -Wall %(source)s -o %(output)s -lm" 
    9191 
    92 # Assume the default location of module DLLs is in top level /models dir. 
    93 DLL_PATH = joinpath(splitpath(realpath(sys.argv[0]))[0], "models") 
     92# Windows-specific solution 
     93if os.name == 'nt': 
     94    # Assume the default location of module DLLs is in top level /models dir. 
     95    # Relying on the Windows installer placing target items in the right place 
     96    DLL_PATH = os.path.join(os.path.split(os.path.realpath(sys.argv[0]))[0], "models") 
     97else: 
     98    # Set up the default path for compiled modules. 
     99    DLL_PATH = tempfile.gettempdir() 
    94100 
    95101ALLOW_SINGLE_PRECISION_DLLS = True 
  • setup.py

    r9ccf580 rff97458  
    22from setuptools import setup,find_packages 
    33 
    4 # Create the model .so's 
    5 os.system("python gen_so.py") 
     4if os.name == 'nt': 
     5    # Create the model .so's on windows 
     6    os.system("python gen_so.py") 
    67 
    78packages = find_packages(exclude=['contrib', 'docs', 'tests*']) 
Note: See TracChangeset for help on using the changeset viewer.