Skip to content

platformio: 3.4.1 -> 3.5.0 - #33367

Merged
FRidh merged 1 commit into
NixOS:masterfrom
mogorman:platformio-3.5.0
Jan 6, 2018
Merged

FRidh merged 1 commit into
NixOS:masterfrom
mogorman:platformio-3.5.0

Conversation

@mogorman

@mogorman mogorman commented Jan 3, 2018

Copy link
Copy Markdown
Contributor
Motivation for this change

i wanted to use an esp32 so i needed to update platformio. it needs a specific version of lru_cache because arrow 0.12.0 needs a specific version it seems. also the wrapper function had to be changed as it was not linking to the lru package correctly.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • [X ] 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"
  • [ X] Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mogorman
mogorman requested a review from FRidh as a code owner January 3, 2018 05:09
@mogorman mogorman changed the title platformio: 3.4.1 -> 3.5.0c platformio: 3.4.1 -> 3.5.0 Jan 3, 2018
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 3, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would rather patch the line install_requires.append('backports.functools_lru_cache==1.2.1') from setup.py to read install_requires.append('backports.functools_lru_cache>=1.2.1').

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I've patched the setup.py in 340cadd.

Comment thread pkgs/top-level/python-packages.nix Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Even if arrow really does require a very specific version of lru_cache this version should not be exposed in python-packages.nix.

Ideally arrow should be patched to not require a very explicit version but if it really does this override should be moved to the arrow directory.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Additional versions of packages are not permitted in python-packages.nix at all as they cause collisions, so also not inside expressions. Applications that are defined outside python-packages.nix can override the package set to insert whatever version they need.

Comment thread pkgs/top-level/python-packages.nix Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Additional versions of packages are not permitted in python-packages.nix at all as they cause collisions, so also not inside expressions. Applications that are defined outside python-packages.nix can override the package set to insert whatever version they need.

@mogorman

mogorman commented Jan 3, 2018 •

Copy link
Copy Markdown
Contributor Author

made changes requested by @FRidh and @adisbladis and verified it still worked on my box. I also added pio alias as it has been bugging me its not there

@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-darwin: 11-100 This PR causes between 11 and 100 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Jan 3, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

typo

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this needed? wrapPythonPrograms already sets PATH and injects PYTHONPATH.
Note also that the postFixup (or fixupPhase in general) is preferred for wrappers.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

you are right its no longer needed with the other fixes in place. earlier i was not seeing the lru getting linked in properly.

@mogorman
mogorman force-pushed the platformio-3.5.0 branch 3 times, most recently from f3d2507 to 147abaa Compare January 3, 2018 17:59
@FRidh

FRidh commented Jan 3, 2018

Copy link
Copy Markdown
Member

What are the packages in the chrootenv for? They all seem to be dependencies of platformio already. Did you get an import error if you did not add say the backports package?

@mogorman

mogorman commented Jan 3, 2018

Copy link
Copy Markdown
Contributor Author

Earlier i thought I did. I just tested it with them removed and it runs fine as well. I pushed updated code just now @FRidh

@FRidh

FRidh commented Jan 3, 2018

Copy link
Copy Markdown
Member

I think you may as well write python.withPackages(ps: with ps; [ platformio ]) instead of the current dependencies.

@mogorman

mogorman commented Jan 3, 2018

Copy link
Copy Markdown
Contributor Author

@FRidh i am happy to make that change but im not sure how. i looked at some of the packages that make use of it but not sure i completely grok whats going on.

@FRidh

FRidh commented Jan 4, 2018

Copy link
Copy Markdown
Member

@mogorman it creates a tree of symbolic links including the listed packages and Python dependencies.

@mogorman

mogorman commented Jan 4, 2018

Copy link
Copy Markdown
Contributor Author

right @FRidh , im just not sure how to correctly to use it in the expression and have the resulting fhsuserenv work. i tried saying let pythonUserEnv = python.withPackages(ps: with ps; [ platformio ]) and then including that instead of the python deps and it failed to run

@FRidh

FRidh commented Jan 6, 2018 •

Copy link
Copy Markdown
Member

i tried saying let pythonUserEnv = python.withPackages(ps: with ps; [ platformio ]) and then including that instead of the python deps and it failed to run

That's a pity, I thought that could work. How did it fail? With what error?

@FRidh
FRidh merged commit b78c42c into NixOS:master Jan 6, 2018
@FRidh

FRidh commented Jan 6, 2018

Copy link
Copy Markdown
Member

In any case, that's an improvement that can be made separate from this PR.

@mogorman
mogorman deleted the platformio-3.5.0 branch January 6, 2018 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants