Skip to content

Add py-imageio for python3#8553

Merged
adamjstewart merged 3 commits intospack:developfrom
s-sajid-ali:py_imageio_python_3
Jun 26, 2018
Merged

Add py-imageio for python3#8553
adamjstewart merged 3 commits intospack:developfrom
s-sajid-ali:py_imageio_python_3

Conversation

@s-sajid-ali
Copy link
Copy Markdown
Contributor

@s-sajid-ali s-sajid-ali commented Jun 23, 2018

Add new package py-imageio.

Don't merge until concretizer can choose dependencies for python 2 vs 3. (Redundant dependencies can be added as a workaround if people need this.)

Note: https://pypi.io/packages/source/I/imageio/imageio-2.3.0.tar.gz does not work

@s-sajid-ali s-sajid-ali force-pushed the py_imageio_python_3 branch from 94c69e4 to 1abd03a Compare June 25, 2018 16:30
@s-sajid-ali
Copy link
Copy Markdown
Contributor Author

Done. Changed the checksum to match the pypi version this time!

Copy link
Copy Markdown
Member

@adamjstewart adamjstewart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs some flake8 changes:

var/spack/repos/builtin/packages/py-imageio/package.py:29: [W291] trailing whitespace
var/spack/repos/builtin/packages/py-imageio/package.py:30: [W291] trailing whitespace
var/spack/repos/builtin/packages/py-imageio/package.py:31: [W291] trailing whitespace
var/spack/repos/builtin/packages/py-imageio/package.py:39: [E265] block comment should start with '# '
var/spack/repos/builtin/packages/py-imageio/package.py:42: [E231] missing whitespace after ','
var/spack/repos/builtin/packages/py-imageio/package.py:47: [E303] too many blank lines (2)

Don't merge until concretizer can choose dependencies for python 2 vs 3. (Redundant dependencies can be added as a workaround if people need this.)

I don't see any reason not to merge this. Can you elaborate?


def build_args(self, spec, prefix):
args = []
return args
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove this function if you aren't going to use it.

# Fix for python 2 if needed.
depends_on('py-numpy', type=('build','run'))
depends_on('py-pillow', type=('build', 'run'))
depends_on('ffmpeg', type='run')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the following dependencies:

depends_on('[email protected]:2.8,3.4:', type=('build', 'run'))
depends_on('py-setuptools', type='build')

@s-sajid-ali
Copy link
Copy Markdown
Contributor Author

The setup.py from the github repo has this

 install_requires = [
        'numpy',
        'pillow',
        'enum34; python_version < "3.4"',
        'futures; python_version < "3.2"'
],

Since the last two depend on the version of python and spack can't pick dependencies based on python 2 vs 3, I stated that if someone is using python2 and wants this, they can add a depends on py-enum34 and py-futures as a stopgap until the concretizer is fixed.

@adamjstewart
Copy link
Copy Markdown
Member

I see. Well the latest tarball doesn't have these restrictions, so I think we can ignore this problem for now. Hopefully the concretizer will be updated before someone needs to add a new release of py-imageio.

@s-sajid-ali
Copy link
Copy Markdown
Contributor Author

s-sajid-ali commented Jun 25, 2018

I'm getting a strange error when I try to activate it. What causes this ?

[sajid@xrmlite intel-18.0.3]$ spack find -ldf py-imageio
==> 1 installed packages.
-- linux-centos7-x86_64 / [email protected] --------------------------
u2nin6h    [email protected]%intel
2o6dsmy        ^[email protected]%intel
ik46rji            ^[email protected]%intel
eu4bndh        ^[email protected]%intel
igylo3k            ^[email protected]%intel
gorhtot            ^[email protected]%intel
akk4pld                ^[email protected]%intel
4krmbbu                ^[email protected]%intel
c7bu4ts                    ^[email protected]%intel
rpcqo55                        ^[email protected]%intel
kxxpbno                ^[email protected]%intel
vonxam4                    ^[email protected]%intel
t3b5otl                ^[email protected]%intel
zo6tm3o        ^[email protected]%intel
37tkd4t            ^[email protected]%intel
tkydo2r                ^[email protected]%intel
ub3r732            ^[email protected]%intel
2v3pjm4                ^[email protected]%intel
nnft4ld                ^[email protected]%intel
kgbcgub                    ^[email protected]%intel

[sajid@xrmlite intel-18.0.3]$ spack activate [email protected]%intel
==> Error: Spec mfndl3jhvdmmxv7lvheusdti7fg7refa not found in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/py-imageio-2.3.0-mfndl3jhvdmmxv7lvheusdti7fg7refa

It worked fine with [email protected], but I re-built it because that ffmpeg didn't work and now imageio won't load.

@s-sajid-ali
Copy link
Copy Markdown
Contributor Author

s-sajid-ali commented Jun 25, 2018

Even if I force it to activate the correct version by DAG, it won't work.

[sajid@xrmlite intel-18.0.3]$ spack activate /u2nin6h
==> Error: Spec mfndl3jhvdmmxv7lvheusdti7fg7refa not found in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/py-imageio-2.3.0-mfndl3jhvdmmxv7lvheusdti7fg7refa

Why is spack looking for the wrong dag ?

Neither will it uninstall.

[sajid@xrmlite spack]$ spack uninstall --force py-imageio
==> The following packages will be uninstalled:

-- linux-centos7-x86_64 / [email protected] --------------------------
u2nin6h [email protected]%intel

==> Do you want to proceed? [y/N] y
==> Error: Spec mfndl3jhvdmmxv7lvheusdti7fg7refa not found in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/py-imageio-2.3.0-mfndl3jhvdmmxv7lvheusdti7fg7refa

Uninstalled from develop, removed the old module file and the problem still persists.

@healther
Copy link
Copy Markdown
Contributor

==> Error: Spec mfndl3jhvdmmxv7lvheusdti7fg7refa not found in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/py-imageio-2.3.0-mfndl3jhvdmmxv7lvheusdti7fg7refa

This looks like a out-of-date database. Try running spack reindex or spack clean -a && spack reindex

@s-sajid-ali
Copy link
Copy Markdown
Contributor Author

As per @adamjstewart , I tried module load and it works.

Clean and re-index and still the same error :

[sajid@xrmlite spack]$ spack clean -a && spack reindex
==> Removing all temporary build stages
==> Removing cached downloads
==> Removing cached information on repositories
==> Removing python cache files
[sajid@xrmlite spack]$ spack activate [email protected]%[email protected]
==> Error: Spec mfndl3jhvdmmxv7lvheusdti7fg7refa not found in /home/sajid/packages/spack/opt/spack/linux-centos7-x86_64/intel-18.0.3/py-imageio-2.3.0-mfndl3jhvdmmxv7lvheusdti7fg7refa

@adamjstewart adamjstewart merged commit 729bed3 into spack:develop Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants