Skip to content

Paramiko python extensions + his deps and other related extensions#4158

Merged
adamjstewart merged 8 commits intospack:developfrom
RemoteConnectionManager:pr/paramiko
May 8, 2017
Merged

Paramiko python extensions + his deps and other related extensions#4158
adamjstewart merged 8 commits intospack:developfrom
RemoteConnectionManager:pr/paramiko

Conversation

@luigi-calori
Copy link
Copy Markdown
Contributor

I need Paramiko and these other extensions. added extension needed in my use case.
unsure is dependency have been specified correctly

and primitives to Python developers"""

homepage = "https://pypi.python.org/pypi/cryptography"
url = "https://pypi.python.org/packages/ec/5f/d5bc241d06665eed93cd8d3aa7198024ce7833af7a67f6dc92df94e00588/cryptography-1.8.1.tar.gz#md5=9f28a9c141995cd2300d0976b4fac3fb"
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.


version('0.22.0', '74a8b9402625b38ef19cf3fa69ef8470')

depends_on('py-setuptools', type=('build', 'link'))
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.

This should probably be build only.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

remnant of when using #2548 to build python+tk


depends_on('py-setuptools', type=('build', 'link'))
depends_on('py-cffi', type=('build', 'link', 'run'))
depends_on('py-asn1crypto', type=('build', 'link', '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.

These should be 'build', 'run'. Also, you're missing half a dozen dependencies. Check the setup.py and look at install_requires and setup_requires.


version('1.8.1', '9f28a9c141995cd2300d0976b4fac3fb')

depends_on('py-setuptools', type=('build', 'link'))
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.

Type 'build' only.


version('1.0.18', '310c2dfd64eb6f0df44aa8c59f2334a7')

# depends_on('py-setuptools', type='build')
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 uncomment this, it uses setuptools if found.

class PyParamiko(PythonPackage):
"""SSH2 protocol library"""

# FIXME: Add a proper url for your package's homepage here.
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.

Delete this line.


version('2.1.2', '41a8ea0e8abb03a6bf59870670d4f46c')

depends_on('py-setuptools', type=('build', 'link'))
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.

Type 'build' only.

depends_on('py-cryptography', type=('build', 'link', 'run'))
depends_on('py-enum34', type=('build', 'link', 'run'))
depends_on('py-ipaddress', type=('build', 'link', 'run'))
depends_on('py-idna', type=('build', 'link', '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.

('build', 'run') only.

I see the following requirements:

install_requires=[                                                          
    'cryptography>=1.1',                                                    
    'pyasn1>=0.1.7',                                                        
],

Where are the rest coming from? Also, can you be more specific about the versions required?


# depends_on('py-setuptools', type=('build', 'link'))
# depends_on('py-setuptools', type='include')
# depends_on('gmp')
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.

Yes, it looks like this package requires either gmp or mpir for Crypto.PublicKey._fastmath. You don't have to add the latter, gmp is fine.

# depends_on('py-setuptools', type=('build', 'link'))
# depends_on('py-setuptools', type='include')
# depends_on('gmp')
# not just build-time, requires pkg_resources
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.

This package doesn't require pkg_resources...

depends_on('[email protected]:', type=('build', 'run'))
depends_on('[email protected]:', type=('build', 'run'))
depends_on('py-enum34', type=('build', 'run'), when='^python@:3.4')
depends_on('py-ipaddress', type=('build', 'run'), when='^python@:3.3')
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.

Does this actually work? I've had problems with this in the past. See py-flake8 and #2793.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I' ve just built now,
I ' ve tried to follow other packages, some are commented but other are using.
I thought you suggested

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.

If I remember correctly, it depends on whether it needs to be present by default (Python 2.7) or not (Python 3). Basically, if you explicitly specify the version, it will always work. But sometimes, if you don't specify the version and let it choose the latest version of Python 2, it won't work. But if spack spec py-cryptography works, then it works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm checking now but now
spack spec py-ordereddict
seems to pick up [email protected], at least in my case

@adamjstewart adamjstewart merged commit b65daa9 into spack:develop May 8, 2017
@luigi-calori luigi-calori deleted the pr/paramiko branch May 8, 2017 07:19
diaena pushed a commit to diaena/spack that referenced this pull request May 26, 2017
…pack#4158)

* adding paramiko and missing dependencies, setup to work with spack#2548

* adding other deps for paramiko

* fix flake8 errors

* removed spurious add

* address suggestion for proper dependencies

* fix cryptography deps

* remove FIXME comments and commented depends lines
xavierandrade pushed a commit to xavierandrade/spack that referenced this pull request Jun 16, 2017
…pack#4158)

* adding paramiko and missing dependencies, setup to work with spack#2548

* adding other deps for paramiko

* fix flake8 errors

* removed spurious add

* address suggestion for proper dependencies

* fix cryptography deps

* remove FIXME comments and commented depends lines
EmreAtes pushed a commit to EmreAtes/spack that referenced this pull request Jul 10, 2017
…pack#4158)

* adding paramiko and missing dependencies, setup to work with spack#2548

* adding other deps for paramiko

* fix flake8 errors

* removed spurious add

* address suggestion for proper dependencies

* fix cryptography deps

* remove FIXME comments and commented depends lines
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