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

Implement platform_system in requirements.txt #144

Open
Neradoc opened this issue Apr 20, 2022 · 3 comments
Open

Implement platform_system in requirements.txt #144

Neradoc opened this issue Apr 20, 2022 · 3 comments

Comments

@Neradoc
Copy link
Contributor

Neradoc commented Apr 20, 2022

Pip uses the following notation for platform-specific modules:

pywin32;platform_system=='Windows'
pyudev;platform_system=='Linux'

circup install -r would pick those as pywin32;platform_system, etc.

Would it be a good idea to:

  • have circup find and read the platform_system parameter (and ignore the module)
  • use a platform_system=='circuitpython' to specify modules that pip will ignore, but circup still install

This would allow pip and circup requirements to live in the same file to some extent for, say a project that is to be deployed on both a host and a target board. (For example circup itself can be a requirement for the host). Modules without a platform_system specified would still be installed (or ignored if known) as usual.

@chabala
Copy link

chabala commented Apr 21, 2022

Thank you for writing this up @Neradoc

@Neradoc
Copy link
Contributor Author

Neradoc commented Apr 21, 2022

Interestingly since circup cuts the line at the == sign to ignore the version, this format works to have the module ignored by pip and installed by circup.

adafruit_datetime==0;platform_system=='circuitpython'

@askpatrickw
Copy link
Contributor

There is an interesting and related discussion on my Gist from 2021 about how maybe (someday) you could use pip to install to circuitpython libraries onto boards.

https://gist.github.com/askpatrickw/e69eacd2c60c8e27f255d976ab5e8820

chabala added a commit to chabala/pi-pico-serial-web-api that referenced this issue Apr 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants