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

Fix setup.py on debian #2853

Merged
merged 2 commits into from Nov 15, 2017

Conversation

Projects
None yet
4 participants
@wiredfool
Member

wiredfool commented Nov 13, 2017

Fixes #2851 .

Apparently Debian strips out all the platform detection code when building .debs, and we're missing support for some arm variants. But since that support is missing, we pop an error when we don't detect the linux version.

Changes proposed in this pull request:

  • Promote the add_multiarch_paths to run before the manual detection, if we know we're on a debian derivative. This is going to continue to fail on non-ubuntu/non-debian debian derivatives.
  • Refactor a series of elifs into a data structure.
@hugovk

This comment has been minimized.

Show comment
Hide comment
@hugovk

hugovk Nov 13, 2017

Member

+ # Ubunbu <= Precise fails, >= Trusty succeeds.

Do we care about <= Precise? Trusty is the oldest LTS supported.

image

https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions

Member

hugovk commented Nov 13, 2017

+ # Ubunbu <= Precise fails, >= Trusty succeeds.

Do we care about <= Precise? Trusty is the oldest LTS supported.

image

https://en.wikipedia.org/wiki/Ubuntu_version_history#Table_of_versions

@wiredfool

This comment has been minimized.

Show comment
Hide comment
@wiredfool

wiredfool Nov 13, 2017

Member

For some reason, I thought it was good till next year, even after migrating off of it. It's still in the docker builds, but we could drop that, as we've likely got library coverage for old libraries on the centos build.

Member

wiredfool commented Nov 13, 2017

For some reason, I thought it was good till next year, even after migrating off of it. It's still in the docker builds, but we could drop that, as we've likely got library coverage for old libraries on the centos build.

@wiredfool

This comment has been minimized.

Show comment
Hide comment
@wiredfool

wiredfool Nov 13, 2017

Member

Ok, I've removed debian from the tests, and force rebased this one on top of that.

Member

wiredfool commented Nov 13, 2017

Ok, I've removed debian from the tests, and force rebased this one on top of that.

@gerardgilliland

This comment has been minimized.

Show comment
Hide comment
@gerardgilliland

gerardgilliland Nov 14, 2017

Wiredfool,

You commented, there's got to be a better way ... But at least you have left enough tracks to help me.
I am attempting to install hyperspy
And thanks to the help of Josh Taillon, Petras Jokubauskas, Magnus Nord, and bochecha
I am down to the last module (I think or at least I hope).

I have the same problem as bochecha:
Can't build Pillow on Debian armhf
#2851
I can't build Pillow on a Raspberry Pi ARM processor which I believe falls under his category.
The bottom line(s):
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
And I think the following should say arm rather than 386
File "/tmp/pip-build-3866ru_p/pillow/setup.py", line 577, in build_extensions
raise RequiredDependencyException(f)

I believe your fix includes 2851.
Having never gone beyond the standard install,
How do I avoid waiting for an unknown time for this to show up when I attempt to install ?
This tells me how to contribute (using the master)
https://github.com/python-pillow/Pillow/blob/master/.github/CONTRIBUTING.md
by going to https://github.com/python-pillow/Pillow/pulls and clicking “New Pull Request”
But I think, master plus your fixes are at:
https://github.com/wiredfool
under Contribution activity
with the release and date: Release 4.4.0 Issue: 2018-01-01
Could you please point me to any link that would be:
Pillow master, plus ARM processor selection fix, plus Pillow fixes
That would occur within the next day or two?

Thank you and Peace,
Gerard Gilliland

gerardgilliland commented Nov 14, 2017

Wiredfool,

You commented, there's got to be a better way ... But at least you have left enough tracks to help me.
I am attempting to install hyperspy
And thanks to the help of Josh Taillon, Petras Jokubauskas, Magnus Nord, and bochecha
I am down to the last module (I think or at least I hope).

I have the same problem as bochecha:
Can't build Pillow on Debian armhf
#2851
I can't build Pillow on a Raspberry Pi ARM processor which I believe falls under his category.
The bottom line(s):
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
And I think the following should say arm rather than 386
File "/tmp/pip-build-3866ru_p/pillow/setup.py", line 577, in build_extensions
raise RequiredDependencyException(f)

I believe your fix includes 2851.
Having never gone beyond the standard install,
How do I avoid waiting for an unknown time for this to show up when I attempt to install ?
This tells me how to contribute (using the master)
https://github.com/python-pillow/Pillow/blob/master/.github/CONTRIBUTING.md
by going to https://github.com/python-pillow/Pillow/pulls and clicking “New Pull Request”
But I think, master plus your fixes are at:
https://github.com/wiredfool
under Contribution activity
with the release and date: Release 4.4.0 Issue: 2018-01-01
Could you please point me to any link that would be:
Pillow master, plus ARM processor selection fix, plus Pillow fixes
That would occur within the next day or two?

Thank you and Peace,
Gerard Gilliland

@hugovk

This comment has been minimized.

Show comment
Hide comment
@hugovk

hugovk Nov 14, 2017

Member

You can test this out with:

git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm

Then building the source as detailed in the docs.

Member

hugovk commented Nov 14, 2017

You can test this out with:

git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm

Then building the source as detailed in the docs.

@gerardgilliland

This comment has been minimized.

Show comment
Hide comment
@gerardgilliland

gerardgilliland Nov 14, 2017

gerardgilliland commented Nov 14, 2017

@hugovk

This comment has been minimized.

Show comment
Hide comment
@hugovk

hugovk Nov 14, 2017

Member

Once you have the prerequisites in place, don't 'pip install pillow', which installs the last release from PyPI, but instead run 'python setup.py install' from the cloned Pillow directory.

Member

hugovk commented Nov 14, 2017

Once you have the prerequisites in place, don't 'pip install pillow', which installs the last release from PyPI, but instead run 'python setup.py install' from the cloned Pillow directory.

@gerardgilliland

This comment has been minimized.

Show comment
Hide comment
@gerardgilliland

gerardgilliland Nov 15, 2017

gerardgilliland commented Nov 15, 2017

@hugovk

This comment has been minimized.

Show comment
Hide comment
@hugovk

hugovk Nov 15, 2017

Member

Merging.

@gerardgilliland Would you like to open a new issue?

https://github.com/python-pillow/Pillow/issues/new

Member

hugovk commented Nov 15, 2017

Merging.

@gerardgilliland Would you like to open a new issue?

https://github.com/python-pillow/Pillow/issues/new

@hugovk hugovk merged commit 90eb47d into python-pillow:master Nov 15, 2017

5 checks passed

codecov/patch Coverage not affected when comparing 56aa776...3d4045e
Details
codecov/project 83.39% (+0.74%) compared to 56aa776
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls First build on master at 83.39%
Details
@gerardgilliland

This comment has been minimized.

Show comment
Hide comment
@gerardgilliland

gerardgilliland Nov 16, 2017

Hugo:
You asked: “Would I like to open a new issue ?”

With your help, Yes.

I know how to install and run
git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm
and run
python setup.py install
from the cloned Pillow directory on Raspberry Pi (with your help).
However, the above fails to build Pillow.
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

However, No.

I am simply testing the app and the original failure defined by bochecha still exists.
In other words I was getting this same message the same day #2851 was opened.
And the same other errors as well.
And the same errors with wiredfool’s new code that you linked me to.
So, I would be causing confusion.
I think when other testers on different systems check in to run the same code you linked me to,
They would have the same error as I am getting.
Because I believe bochecha still “Can't build Pillow on Debian armhf”.
If #2853 can’t be changed even though is doesn’t solve the problem,
Then I believe bochecha will open a new issue.
And I will certainly comment on it, that I have the same problem on a Raspberry Pi.

So, Maybe.

I will look at wiredfool’s code in the cloned Pillow folder.
And see if I can get the
python setup.py install
to run to completion.

That is my perspective. Please correct me where I am wrong.

Thank you and Peace,
Gerard

gerardgilliland commented Nov 16, 2017

Hugo:
You asked: “Would I like to open a new issue ?”

With your help, Yes.

I know how to install and run
git clone https://github.com/wiredfool/Pillow/
cd Pillow
git checkout debian-arm
and run
python setup.py install
from the cloned Pillow directory on Raspberry Pi (with your help).
However, the above fails to build Pillow.
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.

However, No.

I am simply testing the app and the original failure defined by bochecha still exists.
In other words I was getting this same message the same day #2851 was opened.
And the same other errors as well.
And the same errors with wiredfool’s new code that you linked me to.
So, I would be causing confusion.
I think when other testers on different systems check in to run the same code you linked me to,
They would have the same error as I am getting.
Because I believe bochecha still “Can't build Pillow on Debian armhf”.
If #2853 can’t be changed even though is doesn’t solve the problem,
Then I believe bochecha will open a new issue.
And I will certainly comment on it, that I have the same problem on a Raspberry Pi.

So, Maybe.

I will look at wiredfool’s code in the cloned Pillow folder.
And see if I can get the
python setup.py install
to run to completion.

That is my perspective. Please correct me where I am wrong.

Thank you and Peace,
Gerard

if arch_tp == ("x86_64", "32bit"):
# 32-bit build on 64-bit machine.
# This should be correct on debian derivatives.
if plat.dist()[0].lower() in ('debian', 'ubuntu'):

This comment has been minimized.

@bochecha

bochecha Nov 22, 2017

platform.dist() is deprecated and will be removed in Python 3.7

@bochecha

bochecha Nov 22, 2017

platform.dist() is deprecated and will be removed in Python 3.7

This comment has been minimized.

@wiredfool

wiredfool Nov 22, 2017

Member

Great. Some batteries included I guess.

@wiredfool

wiredfool Nov 22, 2017

Member

Great. Some batteries included I guess.

@wiredfool wiredfool deleted the wiredfool:debian-arm branch Jan 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment