Commit 284bcd7d authored by Alessandro Mirone's avatar Alessandro Mirone

=== 2019a ============

parent d8b41167
......@@ -46,6 +46,7 @@ import logging
import shutil
import os
import numpy
import glob
from .utilstest import UtilsTest
......@@ -68,14 +69,27 @@ def get_project_name(root_dir):
:return: The name of the project stored in root_dir
"""
logger.debug("Getting project name in %s", root_dir)
p = subprocess.Popen([sys.executable, "setup.py", "--name"],
shell=False, cwd=root_dir, stdout=subprocess.PIPE)
name, _stderr_data = p.communicate()
logger.debug("subprocess ended with rc= %s", p.returncode)
print(" PROJECT ", name )
print(" PROJECT ", name.split()[-1].decode('ascii') )
return name.split()[-1].decode('ascii')
exists = os.path.isfile(os.path.join( root_dir, "setup.py" ) )
if exists :
p = subprocess.Popen([sys.executable, "setup.py", "--name"],
shell=False, cwd=root_dir, stdout=subprocess.PIPE)
name, _stderr_data = p.communicate()
logger.debug("subprocess ended with rc= %s", p.returncode)
print(" PROJECT ", name )
print(" PROJECT ", name.split()[-1].decode('ascii') )
return name.split()[-1].decode('ascii')
else:
fns = glob.glob(os.path.join(root_dir,"*"))
print( fns)
for n in fns:
if n[:] == "PyHST2_":
return n
raise Exception( " unable to find project name " )
def compara_vols(ref, new , tol ):
class parInfo:
......
......@@ -44,6 +44,8 @@ import unittest
import sys
import logging
from .utilstest import UtilsTest
import os
import glob
logger = logging.getLogger(__name__)
......@@ -54,14 +56,27 @@ def get_project_name(root_dir):
:return: The name of the project stored in root_dir
"""
logger.debug("Getting project name in %s", root_dir)
p = subprocess.Popen([sys.executable, "setup.py", "--name"],
shell=False, cwd=root_dir, stdout=subprocess.PIPE)
name, _stderr_data = p.communicate()
logger.debug("subprocess ended with rc= %s", p.returncode)
print(" PROJECT ", name )
print(" PROJECT ", name.split()[-1].decode('ascii') )
return name.split()[-1].decode('ascii')
exists = os.path.isfile(os.path.join( root_dir, "setup.py" ) )
if exists :
p = subprocess.Popen([sys.executable, "setup.py", "--name"],
shell=False, cwd=root_dir, stdout=subprocess.PIPE)
name, _stderr_data = p.communicate()
logger.debug("subprocess ended with rc= %s", p.returncode)
print(" PROJECT ", name )
print(" PROJECT ", name.split()[-1].decode('ascii') )
return name.split()[-1].decode('ascii')
else:
fns = glob.glob(os.path.join(root_dir,"*"))
print( "======= ", fns)
for n in fns:
if "PyHST2_" in n :
index = n.find("PyHST2_")
n =n[index:]
return n
raise Exception( " unable to find project name " )
class TestDummy(unittest.TestCase):
def test_dummy(self):
......
......@@ -647,7 +647,7 @@ def do_pyhst():
ext_modules.append(build_segmentation())
if DOCUDA:
ext_modules.append(build_gputomo())
# ext_modules.append(build_gpuunsharp())
ext_modules.append(build_gpuunsharp())
ext_modules.append(build_projection())
#ext_modules.append(build_wavelets())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment