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

Packages missing from built bundle #61

Open
jamesbowman opened this issue Feb 10, 2021 · 4 comments
Open

Packages missing from built bundle #61

jamesbowman opened this issue Feb 10, 2021 · 4 comments

Comments

@jamesbowman
Copy link

jamesbowman commented Feb 10, 2021

I am building the circuitpython community bundle, and followed the directions in the README:

git submodule init
git submodule update
./update-submodules.sh
circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2

the bundle builds without error.

I'm interested in drivers that are packages, for example wiichuck, but none of them are present in my bundle:

$ unzip -l bundles/adafruit-circuitpython-bundle-py-20210209.zip|grep wiichuck
      497  2021-02-09 19:18   adafruit-circuitpython-bundle-py-20210209/examples/wiichuck_simpletest.py

Whereas when I look in the public release bundle, wiichuck is present:

$ unzip -l circuitpython-community-bundle-py-20210209.zip | grep wiichuck
     4495  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/lib/wiichuck/guitar.py
     3288  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/lib/wiichuck/udraw.py
     2518  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/lib/wiichuck/__init__.py
     4987  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/lib/wiichuck/classic_controller.py
     5001  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/lib/wiichuck/dj_table.py
     3465  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/lib/wiichuck/nunchuk.py
      497  2021-02-09 05:09   circuitpython-community-bundle-py-20210209/examples/wiichuck_simpletest.py

I checked that libraries/drivers/wiichuck/ exists in my tree and is populated. It is strange the the wiichuck example does get built, but the driver does not.

The same is true of every submodule that builds a package. The .zip I build contains no subdirectories under lib/, only .py files.

Building on Python 3.8, with tools version 1.6.0 in a venv as recommended, on both Ubuntu 18.04 and 20.04.

@tannewt
Copy link
Member

tannewt commented Feb 10, 2021

Looks like there is some package related tricks here: https://github.com/adafruit/CircuitPython_Community_Bundle/blob/master/.github/workflows/build.yml#L37

@jamesbowman
Copy link
Author

Aha, thanks, so running this:

ls -RUx |
        gawk -F '\n' '{ match($1, /(drivers|helpers)\/(.+)\/(.+)\:/, arr) ; if (length(arr[0]) > 0 && match(arr[3], arr[2]) > 0) printf "%s, ", arr[3] }' |
        gawk '{ trimmed = substr($0, 1, length($0) - 2) ; print "\"" trimmed "\"" }'

outputs:

"nonblocking_timer, jepler_udecimal, dotstar_featherwing, gamblor21_ahrs, barbudor_ina3221, wiichuck, circuitpython_nrf24l01"

And then building with this string supplied as --package_folder_prefix does the expected thing:

circuitpython-build-bundles --filename_prefix adafruit-circuitpython-bundle --library_location libraries --library_depth 2 \
--package_folder_prefix "nonblocking_timer, jepler_udecimal, dotstar_featherwing, gamblor21_ahrs, barbudor_ina3221, wiichuck, circuitpython_nrf24l01"

@jamesbowman
Copy link
Author

Shall I make a PR for CircuitPython_Community_Bundle with a shell script build.sh to do the above, and use it in the README?

@tannewt
Copy link
Member

tannewt commented Feb 12, 2021

Yes please! That'd be great.

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

2 participants