Commit 6e5b4d76 authored by Rafael Monnerat's avatar Rafael Monnerat

OBS: download source instead of compiled wheels so that it can build in OBS

parent 631e6dd1
......@@ -45,6 +45,19 @@ echo "$BUILD_ROOT_DIRECTORY" > $CURRENT_DIRECTORY/$SLAPOS_DIRECTORY/slapos/origi
-f http://www.nexedi.org/static/packages/source/slapos.buildout/ && \
./bin/buildout -v) || (./bin/buildout -v || (echo "Failed to run buildout, exiting." && exit 1))
echo "Fetch all eggs in source instead of wheels so that it can build on OBS"
cd "$CURRENT_DIRECTORY/$SLAPOS_DIRECTORY/slapos/slapos_repository/component/slapos/download-cache/dist"
for f in *x86_64.whl
do
package=${f%%-*}
version=${f#*-}
version=${version%%-*}
echo "Fetching $package at version $version"
pip download --no-binary :all: $package==$version
rm $f
done
cd -
# remove all files from build keeping only caches
echo "Deleting unecessary files to reduce source tarball size"
......
  • /cc @jerome @jm @rafael

    For your information, it seems that the egg recipe is downloading wheels by default. When the wheels is specific to x86_64 architecture, it can't be used on other architectures. Hence for those wheels, I manually fetch the sources of the egg.

    It would be better to make the egg recipe prefer the source instead of the wheel but I don't really know how to do that.

  • I don't know a way to make the egg recipe force downloading source, but something like this, downloading the source packages ourselves and putting it where buildout will find them, seems a good workaround.

    Can we assume pip command will be present or do we need to install explicitly ?

  • mentioned in commit 055ffef4

    Toggle commit list
  • Unfortunately, I needed to move away from pip (see 055ffef4)

    Can we assume pip command will be present or do we need to install explicitly ?

    I'm assuming this runs on a correctly configured machine with everything installed. Anyway the script will fail if it's not installed and operator can do the installation.

  • mentioned in commit c6fab4fe

    Toggle commit list
  • mentioned in merge request slapos!1026 (merged)

    Toggle commit list
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment