Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: qiskit: 0.6.1 -> 0.7.3 #56078

Closed
wants to merge 4 commits into from
Closed

Conversation

pandaman64
Copy link
Contributor

@pandaman64 pandaman64 commented Feb 20, 2019

Motivation for this change

Upgrade Qiskit.

Things done

I chose staging as the base because the latest version of Qiskit needs scikit-build, but I couldn't build one of the transitive dependency, libxml2Python, with the following error:

these derivations will be built:
  /nix/store/q414ay3n4g7302dhi4hkpry2b7d6hmyf-libxml2+py-2.9.9.drv
building '/nix/store/q414ay3n4g7302dhi4hkpry2b7d6hmyf-libxml2+py-2.9.9.drv'...
Path /nix/store/vdpzi7q32nkkr6bmka7cwhlr5p26pga1-libxml2-2.9.9-dev/bin/xml2-config is a file and can't be merged into an environment using pkgs.buildEnv! at /nix/store/hafzskpwv85wsz1f8c2ps6n5a87khac7-builder.pl line 88.
builder for '/nix/store/q414ay3n4g7302dhi4hkpry2b7d6hmyf-libxml2+py-2.9.9.drv' failed with exit code 2
error: build of '/nix/store/q414ay3n4g7302dhi4hkpry2b7d6hmyf-libxml2+py-2.9.9.drv' failed

When I rebased onto master and cherry-picked scikit-build and sysconfig fix, it worked.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on python-unstable and target that branch.
cc @FRidh

pkgs/development/python-modules/qiskit-aer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/qiskit-aer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/qiskit-terra/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/qiskit-aer/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/qiskit-terra/default.nix Outdated Show resolved Hide resolved
};

patches = [
./marshmallow-polyfield.patch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make an upstream PR with this patch and add a comment with the link.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adopted an appropriate version of marshmallow_polyfield so this patch is not needed anymore.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should still open an upstream PR because our next automatic upgrade will break qiskit-terra otherwise.

@pandaman64
Copy link
Contributor Author

Please rebase on python-unstable and target that branch.
cc @FRidh

It seems that python-unstable doesn't have scikit-build

@pandaman64
Copy link
Contributor Author

Thank you for the review! I rebased on python-unstable and cherry-picked scikit-build from staging but it fails to compile with the following error:

running install tests
Traceback (most recent call last):
  File "/nix/store/09mdhcj2hvavnb9i54h4hmz3fq84mjm8-python3.7-pluggy-0.8.1/lib/python3.7/site-packages/pluggy/manager.py", line 268, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/nix/store/lkqfyvvhs48p8ya5axn17gr6qlsklvm1-python3.7-bootstrapped-pip-19.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2410, in load
    self.require(*args, **kwargs)
  File "/nix/store/lkqfyvvhs48p8ya5axn17gr6qlsklvm1-python3.7-bootstrapped-pip-19.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2433, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/nix/store/lkqfyvvhs48p8ya5axn17gr6qlsklvm1-python3.7-bootstrapped-pip-19.0.2/lib/python3.7/site-packages/pkg_resources/__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (pytest 4.2.1 (/nix/store/w6cl19k25xmdx12hdms0mf91s0x7gaf9-python3.7-pytest-4.2.1/lib/python3.7/site-packages), Requirement.parse('pytest<4.0.0'))

I'm trying to figure out what's wrong.

@dotlambda
Copy link
Member

It seems that python-unstable doesn't have scikit-build

Now it has. However, we have too many build failures over there. Hence, let's not care about the qiskit bump which is already there and target master. I'm sorry :/

I'm trying to figure out what's wrong.

During the build of which package are you getting the error? You can use pytest_3 if that helps. However, that's not yet available on master which is an argument in favor of targeting python-unstable. Maybe, we'll just have to wait until #55757 is merged.

@pandaman64
Copy link
Contributor Author

Only scikit-build fails. I'll give pytest_3 a try.

@pandaman64 pandaman64 changed the title python: qiskit: 0.6.1 -> 0.7.2 python: qiskit: 0.6.1 -> 0.7.3 Feb 22, 2019
@pandaman64 pandaman64 changed the base branch from python-unstable to master February 22, 2019 05:51
@pandaman64
Copy link
Contributor Author

Rebased onto master. It works now.

@dotlambda
Copy link
Member

@GrahamcOfBorg build python3.pkgs.qiskit python2.pkgs.marshmallow-polyfield

@dotlambda
Copy link
Member

scikit-build seems to be failing again :(

@Gaelan
Copy link
Contributor

Gaelan commented May 8, 2020

It looks like we've gotten up to qiskit 0.18.2, so this PR can probably be closed.

@pandaman64
Copy link
Contributor Author

Closed. Thanks!

@pandaman64 pandaman64 closed this May 8, 2020
@pandaman64 pandaman64 deleted the qiskit branch May 8, 2020 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants