Skip to content
This repository has been archived by the owner on Feb 2, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from HQSquantumsimulations/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
nfwvogt authored Oct 21, 2020
2 parents 3c560a4 + 62dd36d commit f498368
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyquest_cffi/questlib/build_quest.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def build_quest_so() -> None:
#Setting relative paths in libraries
if platform.system() == 'Darwin':
librun = subprocess.run(['otool', '-L', os.path.join(lib_path, '_quest.so')],
stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True)
stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True, check=True)
libraries_text = librun.stdout.split('\n')
for line in libraries_text:
if 'libQuEST.dylib' in line:
Expand Down
14 changes: 9 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ def build_extension(self, ext: Extension) -> None:
check=True)
# Switch off Multithreading on macos because of openmp problems
if platform.system() == 'Darwin':
# Disabling implicit function declaration warning in C compilation
if 'CFLAGS' in os.environ.keys():
os.environ['CFLAGS'] = os.environ['CFLAGS'] + " -Wno-implicit-function-declaration"
else:
os.environ['CFLAGS'] = "-Wno-implicit-function-declaration"
args_for_cmake = ['-DMULTITHREADED=0']
else:
args_for_cmake = []
Expand Down Expand Up @@ -122,9 +127,6 @@ def setup_packages():
with open(os.path.join(path, 'README.md')) as file:
readme = file.read()

with open(os.path.join('LICENSE')) as file:
License = file.read()

install_requires = [
'cffi',
'numpy',
Expand All @@ -138,15 +140,16 @@ def setup_packages():
+ ' to QuEST quantum simulation toolkit;'
+ ' Compile functionality, create, build and import'
+ ' valid QuEST source code from python'),
'version': '3.2.2',
'version': '3.2.3',
'long_description': readme,
'long_description_content_type': 'text/markdown',
'packages': packages,
# 'package_dir': {'': 'pyquest_cffi'},
'author': 'HQS Quantum Simulations: Sebastian Zanker, Nicolas Vogt',
'author_email': '[email protected]',
'url': '',
'download_url': 'https://github.com/HQSquantumsimulations/PyQuEST-cffi/archive/3.2.0.tar.gz',
'license': License,
'license': "Apache License 2.0",
'install_requires': install_requires,
'setup_requires': ['cffi'],
# 'include_package_data': True,
Expand All @@ -156,6 +159,7 @@ def setup_packages():
'cmdclass': {'build_ext': CustomBuild,
'build_py': BuildPyCommand},
'zip_safe': False,
'python_requires': '>=3.6',
'ext_modules': [CustomExtension('questlib')],
}
setup(**setup_args)
Expand Down

0 comments on commit f498368

Please sign in to comment.