XanaduAI / thewalrus

A library for the calculation of hafnians, Hermite polynomials and Gaussian boson sampling.
https://the-walrus.readthedocs.io
Apache License 2.0
101 stars 55 forks source link

Refactor setup.py #229

Closed brownj85 closed 3 years ago

brownj85 commented 3 years ago

Context: If the user sets the CFLAGS environment variable, the build fails.

Description of the Change: User-provided CFLAGS will not override the flags necessary for compilation (in particular -fopenmp). General improvements to the readability of the build script. Will no longer attempt to build without Cython, since it's not possible to do so (libwalrus.cpp does not exist).

Benefits: Fixes bug, nicer build script.

Possible Drawbacks: None

Related GitHub Issues: Fixes https://github.com/XanaduAI/thewalrus/issues/198.

josh146 commented 3 years ago

Hey @brownj85, thanks for this! the new setup.py looks a lot cleaner.

I just want to check if this is ready for review, as I can see that the linux build is failing.

brownj85 commented 3 years ago

Hey @brownj85, thanks for this! the new setup.py looks a lot cleaner.

I just want to check if this is ready for review, as I can see that the linux build is failing.

Hey @josh146, I noticed that - but it doesn't seem to be related to this PR. I re-ran it on master, which passed previously, and it failed: https://app.circleci.com/pipelines/github/XanaduAI/thewalrus/1034/workflows/ad44f38f-423c-4bcb-b979-c87cb42d05cd/jobs/3188.

codecov[bot] commented 3 years ago

Codecov Report

Merging #229 (a44c440) into master (d17451a) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #229   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        21    +1     
  Lines         1187      1200   +13     
=========================================
+ Hits          1187      1200   +13     
Impacted Files Coverage Δ
thewalrus/__init__.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d17451a...a44c440. Read the comment docs.

josh146 commented 3 years ago

it doesn't seem to be related to this PR. I re-ran it on master, which passed previously, and it failed

Weird 🤔 Was this fixed by bumping the CircleCI docker image to 3.6.12?