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

run without *building* packages #78

Open
glensc opened this issue Aug 1, 2018 · 4 comments
Open

run without *building* packages #78

glensc opened this issue Aug 1, 2018 · 4 comments

Comments

@glensc
Copy link

glensc commented Aug 1, 2018

the project readme does not indicate any way that underneath the implementation actually builds and installs the packages.

this means for the command to succeed, i need to install various -dev packages

for example i was looking for this project, to speed up docker builds, using multistage builds.

FROM debian:stretch
RUN apt-get update
RUN apt-get install -y --no-install-recommends python3-pip python3-setuptools
RUN pip3 install pip2pi
RUN pip2tgz packages/ tesserocr==2.3.0
RUN dir2pi packages/

this fails with

root@dind docker/w# docker build -t pip2pi:1 .
Sending build context to Docker daemon  35.33kB
Step 1/9 : FROM debian:stretch
 ---> 3bbb526d2608
Step 2/9 : COPY requirements.txt /usr/src/weblate/
 ---> Using cache
 ---> fafdfec54e56
Step 3/9 : RUN apt-get update
 ---> Using cache
 ---> 94348872497d
Step 4/9 : RUN apt-get install -y --no-install-recommends python3-pip
 ---> Using cache
 ---> 649d90c85c82
Step 5/9 : RUN pip3 install pip2pi
 ---> Using cache
 ---> 82b6573157ea
Step 6/9 : ENV VERSION 3.0.1
 ---> Using cache
 ---> e4256fa8b6f0
Step 7/9 : RUN apt-get install -y --no-install-recommends python3-setuptools
 ---> Using cache
 ---> d05874d08e84
Step 8/9 : RUN pip2tgz packages/ tesserocr==2.3.0
 ---> Running in 022e4f9ef3cd
DEPRECATION: pip install --download has been deprecated and will be removed in the future. Pip now has a download command that should be used instead.
Collecting tesserocr==2.3.0
  Downloading https://files.pythonhosted.org/packages/49/fc/f5d3ca8606566073919a5964118591734e91ee8e42adcc0cc8fcefc3953a/tesserocr-2.3.0.tar.gz (54kB)
  Saved /packages/tesserocr-2.3.0.tar.gz
...
Collecting tesserocr==2.3.0
  Downloading https://files.pythonhosted.org/packages/49/fc/f5d3ca8606566073919a5964118591734e91ee8e42adcc0cc8fcefc3953a/tesserocr-2.3.0.tar.gz (54kB)
  Saved /packages/tesserocr-2.3.0.tar.gz
    Complete output from command python setup.py egg_info:
    Failed to extract tesseract version from executable: [Errno 2] No such file or directory: 'tesseract'
    Supporting tesseract v3.04.00
...

    distutils.errors.DistutilsExecError: command 'x86_64-linux-gnu-gcc' failed with exit status 1
...
@glensc
Copy link
Author

glensc commented Aug 1, 2018

seems to covered by this issue: #70

perhaps pip install --download should be replaced with pip download to solve this?

@safiyat
Copy link
Collaborator

safiyat commented Aug 1, 2018

Failed to extract tesseract version from executable: [Errno 2] No such file or directory: 'tesseract'

From this line, the error seems to be in the package itself than in pip2pi.

@glensc Can you please attach complete error log?

@glensc
Copy link
Author

glensc commented Aug 1, 2018

@safiyat the exact error message is irrelevant. please read the bugreport again what i requested.

the symptom is that the package names given are actually attempted to be installed. thus includes build and compile steps. those must be omitted. these are useless and break process because non-pure python packages will fail if -dev packages missing.

@safiyat
Copy link
Collaborator

safiyat commented Aug 1, 2018

I don't think pip2pi actually installs the packages. It extracts the requested package and then after reading its requirements, downloads those required packages.

python install --download was deprecated, and has been removed in 10.0.0 and above. It only downloads the required packages, and does not install them.

I am stumped though as to why it would want to run x86_64-linux-gnu-gcc.

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