poise-python 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/README.md +12 -1
- data/lib/poise_python/python_providers.rb +5 -0
- data/lib/poise_python/python_providers/dummy.rb +69 -0
- data/lib/poise_python/python_providers/portable_pypy.rb +11 -55
- data/lib/poise_python/python_providers/portable_pypy3.rb +51 -0
- data/lib/poise_python/python_providers/scl.rb +3 -3
- data/lib/poise_python/resources/pip_requirements.rb +2 -1
- data/lib/poise_python/resources/python_package.rb +4 -0
- data/lib/poise_python/version.rb +1 -1
- data/poise-python.gemspec +2 -2
- data/test/spec/python_providers/dummy_spec.rb +56 -0
- data/test/spec/python_providers/portable_pypy3_spec.rb +58 -0
- data/test/spec/python_providers/portable_pypy_spec.rb +6 -16
- metadata +12 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23cf97832c34abc4295ce1e1f1c9d8cc0eb53077
|
4
|
+
data.tar.gz: 48de254c1244bd372046cf863dfd05a4d9878ca6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f700db85d989995831625f6ad79111e8b6cf01b740984e937cdd05c1ec8c3d3b0ffb213a8947b0b83045aa8413d4c06458be759634beb7f0672324926eb866ec
|
7
|
+
data.tar.gz: 37a074375575ee3197d866e9f2ec573b4b24c75490f0c5572b2307812217a773f61912da0ff3549c6d3a3f1278270b22485109cf63eb4b2ee2c3326f7510cba9
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# Poise-Python Changelog
|
2
|
+
|
3
|
+
## v1.1.0
|
4
|
+
|
5
|
+
* Add a `:dummy` provider for `python_runtime` for unit testing or complex overrides.
|
6
|
+
* Support installing development headers for SCL packages.
|
7
|
+
* Refactor Portable PyPy provider to use new helpers from `poise-languages`. This
|
8
|
+
means `portable_pypy` and `portable_pypy3` are now separate providers but the
|
9
|
+
auto-selection logic should still work as before.
|
10
|
+
|
11
|
+
## v1.0.0
|
12
|
+
|
13
|
+
* Initial release!
|
14
|
+
|
data/README.md
CHANGED
@@ -337,7 +337,6 @@ end
|
|
337
337
|
|
338
338
|
The `portable_pypy` provider installs Python using the [Portable PyPy](https://github.com/squeaky-pl/portable-pypy)
|
339
339
|
packages. These are only available for Linux, but should work on any Linux OS.
|
340
|
-
Support is included for both `pypy` and `pypy3`.
|
341
340
|
|
342
341
|
```ruby
|
343
342
|
python_runtime 'myapp' do
|
@@ -346,6 +345,18 @@ python_runtime 'myapp' do
|
|
346
345
|
end
|
347
346
|
```
|
348
347
|
|
348
|
+
### `portable_pypy3`
|
349
|
+
|
350
|
+
The `portable_pypy3` provider installs Python 3 using the [Portable PyPy](https://github.com/squeaky-pl/portable-pypy)
|
351
|
+
packages. These are only available for Linux, but should work on any Linux OS.
|
352
|
+
|
353
|
+
```ruby
|
354
|
+
python_runtime 'myapp' do
|
355
|
+
provider :portable_pypy3
|
356
|
+
version 'pypy3'
|
357
|
+
end
|
358
|
+
```
|
359
|
+
|
349
360
|
#### Options
|
350
361
|
|
351
362
|
* `folder` – Folder to install PyPy in. *(default: /opt/<package name>)*
|
@@ -14,7 +14,11 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
+
require 'chef/platform/provider_priority_map'
|
18
|
+
|
19
|
+
require 'poise_python/python_providers/dummy'
|
17
20
|
require 'poise_python/python_providers/portable_pypy'
|
21
|
+
require 'poise_python/python_providers/portable_pypy3'
|
18
22
|
require 'poise_python/python_providers/scl'
|
19
23
|
require 'poise_python/python_providers/system'
|
20
24
|
|
@@ -27,6 +31,7 @@ module PoisePython
|
|
27
31
|
autoload :Base, 'poise_python/python_providers/base'
|
28
32
|
|
29
33
|
Chef::Platform::ProviderPriorityMap.instance.priority(:python_runtime, [
|
34
|
+
PoisePython::PythonProviders::PortablePyPy3,
|
30
35
|
PoisePython::PythonProviders::PortablePyPy,
|
31
36
|
PoisePython::PythonProviders::Scl,
|
32
37
|
PoisePython::PythonProviders::System,
|
@@ -0,0 +1,69 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require 'poise_python/python_providers/base'
|
18
|
+
|
19
|
+
|
20
|
+
module PoisePython
|
21
|
+
module PythonProviders
|
22
|
+
# Inversion provider for the `python_runtime` resource to use a fake Python,
|
23
|
+
# for use in unit tests.
|
24
|
+
#
|
25
|
+
# @since 1.1.0
|
26
|
+
# @provides dummy
|
27
|
+
class Dummy < Base
|
28
|
+
provides(:dummy)
|
29
|
+
|
30
|
+
def self.default_inversion_options(node, resource)
|
31
|
+
super.merge({
|
32
|
+
# Manual overrides for dummy data.
|
33
|
+
python_binary: ::File.join('', 'python'),
|
34
|
+
python_environment: nil,
|
35
|
+
})
|
36
|
+
end
|
37
|
+
|
38
|
+
# The `install` action for the `python_runtime` resource.
|
39
|
+
#
|
40
|
+
# @return [void]
|
41
|
+
def action_install
|
42
|
+
# This space left intentionally blank.
|
43
|
+
end
|
44
|
+
|
45
|
+
# The `uninstall` action for the `python_runtime` resource.
|
46
|
+
#
|
47
|
+
# @return [void]
|
48
|
+
def action_uninstall
|
49
|
+
# This space left intentionally blank.
|
50
|
+
end
|
51
|
+
|
52
|
+
# Path to the non-existent python.
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
def python_binary
|
56
|
+
options['python_binary']
|
57
|
+
end
|
58
|
+
|
59
|
+
# Environment for the non-existent python.
|
60
|
+
#
|
61
|
+
# @return [String]
|
62
|
+
def python_environment
|
63
|
+
options['python_environment'] || super
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
@@ -14,7 +14,7 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
-
require '
|
17
|
+
require 'poise_languages/static'
|
18
18
|
|
19
19
|
require 'poise_python/error'
|
20
20
|
require 'poise_python/python_providers/base'
|
@@ -24,73 +24,29 @@ module PoisePython
|
|
24
24
|
module PythonProviders
|
25
25
|
class PortablePyPy < Base
|
26
26
|
provides(:portable_pypy)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
# Only use this to install pypy.
|
34
|
-
#
|
35
|
-
# @api private
|
36
|
-
def self.provides_auto?(node, resource)
|
37
|
-
super || (resource.version.start_with?('pypy') && node['kernel']['name'].downcase == 'linux')
|
38
|
-
end
|
27
|
+
include PoiseLanguages::Static(
|
28
|
+
name: 'pypy',
|
29
|
+
versions: %w{2.6 2.5.1 2.5 2.4 2.3.1 2.3 2.2.1 2.2 2.1 2.0.2},
|
30
|
+
machines: %w{linux-i686 linux-x86_64},
|
31
|
+
url: 'https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-%{version}-%{kernel}_%{machine}-portable.tar.bz2'
|
32
|
+
)
|
39
33
|
|
40
34
|
def python_binary
|
41
|
-
::File.join(
|
35
|
+
::File.join(static_folder, 'bin', 'pypy')
|
42
36
|
end
|
43
37
|
|
44
38
|
private
|
45
39
|
|
46
40
|
def install_python
|
47
|
-
|
48
|
-
folder = pypy_folder
|
49
|
-
url = pypy_package_url
|
50
|
-
|
51
|
-
package %w{tar bzip2}
|
52
|
-
|
53
|
-
unpack = execute 'unpack pypy' do
|
54
|
-
action :nothing
|
55
|
-
command ['tar', 'xjvf', path]
|
56
|
-
cwd ::File.dirname(folder)
|
57
|
-
end
|
58
|
-
|
59
|
-
remote_file path do
|
60
|
-
source url
|
61
|
-
owner 'root'
|
62
|
-
group 'root'
|
63
|
-
mode '644'
|
64
|
-
notifies :run, unpack, :immediately
|
65
|
-
end
|
41
|
+
install_static
|
66
42
|
end
|
67
43
|
|
68
44
|
def uninstall_python
|
69
|
-
|
70
|
-
action :delete
|
71
|
-
recursive true
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
def pypy_package
|
76
|
-
@pypy_package ||= begin
|
77
|
-
match = options['version'].match(/^(pypy(?:|3))(?:-(.*))?$/)
|
78
|
-
package_type = match ? match[1] : 'pypy'
|
79
|
-
version_prefix = (match && match[2]).to_s
|
80
|
-
version = PYPY_PACKAGES[package_type].find {|v| v.start_with?(version_prefix) }
|
81
|
-
"#{package_type}-#{version}-#{node['kernel']['name'].downcase}_#{node['kernel']['machine']}-portable"
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
def pypy_folder
|
86
|
-
options['folder'] || ::File.join('', 'opt', pypy_package)
|
87
|
-
end
|
88
|
-
|
89
|
-
def pypy_package_url
|
90
|
-
options['url'] || "https://bitbucket.org/squeaky/portable-pypy/downloads/#{pypy_package}.tar.bz2"
|
45
|
+
uninstall_static
|
91
46
|
end
|
92
47
|
|
93
48
|
end
|
94
49
|
end
|
95
50
|
end
|
96
51
|
|
52
|
+
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require 'poise_languages/static'
|
18
|
+
|
19
|
+
require 'poise_python/error'
|
20
|
+
require 'poise_python/python_providers/base'
|
21
|
+
|
22
|
+
|
23
|
+
module PoisePython
|
24
|
+
module PythonProviders
|
25
|
+
class PortablePyPy3 < Base
|
26
|
+
provides(:portable_pypy3)
|
27
|
+
include PoiseLanguages::Static(
|
28
|
+
name: 'pypy3',
|
29
|
+
versions: %w{2.4 2.3.1},
|
30
|
+
machines: %w{linux-i686 linux-x86_64},
|
31
|
+
url: 'https://bitbucket.org/squeaky/portable-pypy/downloads/pypy3-%{version}-%{kernel}_%{machine}-portable.tar.bz2'
|
32
|
+
)
|
33
|
+
|
34
|
+
def python_binary
|
35
|
+
::File.join(static_folder, 'bin', 'pypy')
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def install_python
|
41
|
+
install_static
|
42
|
+
end
|
43
|
+
|
44
|
+
def uninstall_python
|
45
|
+
uninstall_static
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
@@ -26,13 +26,13 @@ module PoisePython
|
|
26
26
|
class Scl < Base
|
27
27
|
include PoiseLanguages::Scl::Mixin
|
28
28
|
provides(:scl)
|
29
|
-
scl_package('3.4.2', 'rh-python34', {
|
29
|
+
scl_package('3.4.2', 'rh-python34', 'rh-python34-python-devel', {
|
30
30
|
['redhat', 'centos'] => {
|
31
31
|
'~> 7.0' => 'https://www.softwarecollections.org/en/scls/rhscl/rh-python34/epel-7-x86_64/download/rhscl-rh-python34-epel-7-x86_64.noarch.rpm',
|
32
32
|
'~> 6.0' => 'https://www.softwarecollections.org/en/scls/rhscl/rh-python34/epel-6-x86_64/download/rhscl-rh-python34-epel-6-x86_64.noarch.rpm',
|
33
33
|
},
|
34
34
|
})
|
35
|
-
scl_package('3.3.2', 'python33', {
|
35
|
+
scl_package('3.3.2', 'python33', 'python33-python-devel', {
|
36
36
|
['redhat', 'centos'] => {
|
37
37
|
'~> 7.0' => 'https://www.softwarecollections.org/en/scls/rhscl/python33/epel-7-x86_64/download/rhscl-python33-epel-7-x86_64.noarch.rpm',
|
38
38
|
'~> 6.0' => 'https://www.softwarecollections.org/en/scls/rhscl/python33/epel-6-x86_64/download/rhscl-python33-epel-6-x86_64.noarch.rpm',
|
@@ -42,7 +42,7 @@ module PoisePython
|
|
42
42
|
'~> 20.0' => 'https://www.softwarecollections.org/en/scls/rhscl/python33/fedora-20-x86_64/download/rhscl-python33-fedora-20-x86_64.noarch.rpm',
|
43
43
|
},
|
44
44
|
})
|
45
|
-
scl_package('2.7.8', 'python27', {
|
45
|
+
scl_package('2.7.8', 'python27', 'python27-python-devel', {
|
46
46
|
['redhat', 'centos'] => {
|
47
47
|
'~> 7.0' => 'https://www.softwarecollections.org/en/scls/rhscl/python27/epel-7-x86_64/download/rhscl-python27-epel-7-x86_64.noarch.rpm',
|
48
48
|
'~> 6.0' => 'https://www.softwarecollections.org/en/scls/rhscl/python27/epel-6-x86_64/download/rhscl-python27-epel-6-x86_64.noarch.rpm',
|
@@ -26,7 +26,8 @@ module PoisePython
|
|
26
26
|
# (see PipRequirements::Resource)
|
27
27
|
# @since 1.0.0
|
28
28
|
module PipRequirements
|
29
|
-
# A `pip_requirements` resource to
|
29
|
+
# A `pip_requirements` resource to install packages from a requirements.txt
|
30
|
+
# file using pip.
|
30
31
|
#
|
31
32
|
# @provides pip_requirements
|
32
33
|
# @action install
|
@@ -84,6 +84,10 @@ EOH
|
|
84
84
|
class Resource < Chef::Resource::Package
|
85
85
|
include PoisePython::PythonCommandMixin
|
86
86
|
provides(:python_package)
|
87
|
+
# Manually create matchers because #actions is unreliable.
|
88
|
+
%i{install upgrade remove}.each do |action|
|
89
|
+
Poise::Helpers::ChefspecMatchers.create_matcher(:python_package, action)
|
90
|
+
end
|
87
91
|
|
88
92
|
|
89
93
|
# @!attribute group
|
data/lib/poise_python/version.rb
CHANGED
data/poise-python.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.email = %w{noah@coderanger.net}
|
26
26
|
spec.description = "A Chef cookbook for managing Python installations."
|
27
27
|
spec.summary = spec.description
|
28
|
-
spec.homepage = 'https://github.com/poise/python'
|
28
|
+
spec.homepage = 'https://github.com/poise/poise-python'
|
29
29
|
spec.license = 'Apache 2.0'
|
30
30
|
|
31
31
|
spec.files = `git ls-files`.split($/)
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |spec|
|
|
35
35
|
|
36
36
|
spec.add_dependency 'halite', '~> 1.0'
|
37
37
|
spec.add_dependency 'poise', '~> 2.0'
|
38
|
-
spec.add_dependency 'poise-languages', '~> 1.
|
38
|
+
spec.add_dependency 'poise-languages', '~> 1.2'
|
39
39
|
|
40
40
|
spec.add_development_dependency 'poise-boiler', '~> 1.0'
|
41
41
|
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require 'spec_helper'
|
18
|
+
|
19
|
+
describe PoisePython::PythonProviders::Dummy do
|
20
|
+
let(:python_runtime) { chef_run.python_runtime('test') }
|
21
|
+
step_into(:python_runtime)
|
22
|
+
recipe do
|
23
|
+
python_runtime 'test' do
|
24
|
+
provider :dummy
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
describe '#python_binary' do
|
29
|
+
subject { python_runtime.python_binary }
|
30
|
+
|
31
|
+
it { is_expected.to eq '/python' }
|
32
|
+
end # /describe #python_binary
|
33
|
+
|
34
|
+
describe '#python_environment' do
|
35
|
+
subject { python_runtime.python_environment }
|
36
|
+
|
37
|
+
it { is_expected.to eq({}) }
|
38
|
+
end # /describe #python_environment
|
39
|
+
|
40
|
+
describe 'action :install' do
|
41
|
+
# Just make sure it doesn't error.
|
42
|
+
it { run_chef }
|
43
|
+
end # /describe action :install
|
44
|
+
|
45
|
+
describe 'action :uninstall' do
|
46
|
+
recipe do
|
47
|
+
python_runtime 'test' do
|
48
|
+
action :uninstall
|
49
|
+
provider :dummy
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Just make sure it doesn't error.
|
54
|
+
it { run_chef }
|
55
|
+
end # /describe action :uninstall
|
56
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
#
|
2
|
+
# Copyright 2015, Noah Kantrowitz
|
3
|
+
#
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
# you may not use this file except in compliance with the License.
|
6
|
+
# You may obtain a copy of the License at
|
7
|
+
#
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
#
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
# See the License for the specific language governing permissions and
|
14
|
+
# limitations under the License.
|
15
|
+
#
|
16
|
+
|
17
|
+
require 'spec_helper'
|
18
|
+
|
19
|
+
describe PoisePython::PythonProviders::PortablePyPy3 do
|
20
|
+
let(:python_version) { nil }
|
21
|
+
let(:chefspec_options) { {platform: 'ubuntu', version: '14.04'} }
|
22
|
+
let(:default_attributes) { {poise_python_version: python_version} }
|
23
|
+
let(:python_runtime) { chef_run.python_runtime('test') }
|
24
|
+
step_into(:python_runtime)
|
25
|
+
recipe do
|
26
|
+
python_runtime 'test' do
|
27
|
+
version node['poise_python_version']
|
28
|
+
virtualenv_version false
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
shared_examples_for 'portablepypy3 provider' do |base|
|
33
|
+
it { expect(python_runtime.provider_for_action(:install)).to be_a described_class }
|
34
|
+
it { is_expected.to install_poise_languages_static(File.join('', 'opt', base)).with(source: "https://bitbucket.org/squeaky/portable-pypy/downloads/#{base}-linux_x86_64-portable.tar.bz2") }
|
35
|
+
it { expect(python_runtime.python_binary).to eq File.join('', 'opt', base, 'bin', 'pypy') }
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'with version pypy3' do
|
39
|
+
let(:python_version) { 'pypy3' }
|
40
|
+
it_behaves_like 'portablepypy3 provider', 'pypy3-2.4'
|
41
|
+
end # /context with version pypy3
|
42
|
+
|
43
|
+
context 'with version pypy3-2.3.1' do
|
44
|
+
let(:python_version) { 'pypy3-2.3.1' }
|
45
|
+
it_behaves_like 'portablepypy3 provider', 'pypy3-2.3.1'
|
46
|
+
end # /context with version pypy3-2.3.1
|
47
|
+
|
48
|
+
context 'action :uninstall' do
|
49
|
+
recipe do
|
50
|
+
python_runtime 'test' do
|
51
|
+
version 'pypy3'
|
52
|
+
action :uninstall
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
it { is_expected.to uninstall_poise_languages_static('/opt/pypy3-2.4') }
|
57
|
+
end # /context action :uninstall
|
58
|
+
end
|
@@ -29,32 +29,22 @@ describe PoisePython::PythonProviders::PortablePyPy do
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
shared_examples_for 'portablepypy provider' do |
|
32
|
+
shared_examples_for 'portablepypy provider' do |base|
|
33
33
|
it { expect(python_runtime.provider_for_action(:install)).to be_a described_class }
|
34
|
-
it { is_expected.to
|
35
|
-
it { expect(python_runtime.python_binary).to eq
|
34
|
+
it { is_expected.to install_poise_languages_static(File.join('', 'opt', base)).with(source: "https://bitbucket.org/squeaky/portable-pypy/downloads/#{base}-linux_x86_64-portable.tar.bz2") }
|
35
|
+
it { expect(python_runtime.python_binary).to eq File.join('', 'opt', base, 'bin', 'pypy') }
|
36
36
|
end
|
37
37
|
|
38
38
|
context 'with version pypy' do
|
39
39
|
let(:python_version) { 'pypy' }
|
40
|
-
it_behaves_like 'portablepypy provider', 'pypy-2.6
|
40
|
+
it_behaves_like 'portablepypy provider', 'pypy-2.6'
|
41
41
|
end # /context with version pypy
|
42
42
|
|
43
43
|
context 'with version pypy-2.4' do
|
44
44
|
let(:python_version) { 'pypy-2.4' }
|
45
|
-
it_behaves_like 'portablepypy provider', 'pypy-2.4
|
45
|
+
it_behaves_like 'portablepypy provider', 'pypy-2.4'
|
46
46
|
end # /context with version pypy-2.4
|
47
47
|
|
48
|
-
context 'with version pypy3' do
|
49
|
-
let(:python_version) { 'pypy3' }
|
50
|
-
it_behaves_like 'portablepypy provider', 'pypy3-2.4-linux_x86_64-portable'
|
51
|
-
end # /context with version pypy3
|
52
|
-
|
53
|
-
context 'with version pypy3-2.3.1' do
|
54
|
-
let(:python_version) { 'pypy3-2.3.1' }
|
55
|
-
it_behaves_like 'portablepypy provider', 'pypy3-2.3.1-linux_x86_64-portable'
|
56
|
-
end # /context with version pypy3-2.3.1
|
57
|
-
|
58
48
|
context 'action :uninstall' do
|
59
49
|
recipe do
|
60
50
|
python_runtime 'test' do
|
@@ -63,6 +53,6 @@ describe PoisePython::PythonProviders::PortablePyPy do
|
|
63
53
|
end
|
64
54
|
end
|
65
55
|
|
66
|
-
it { is_expected.to
|
56
|
+
it { is_expected.to uninstall_poise_languages_static('/opt/pypy-2.6') }
|
67
57
|
end # /context action :uninstall
|
68
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poise-python
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noah Kantrowitz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: halite
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: '1.2'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: '1.2'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: poise-boiler
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- ".travis.yml"
|
80
80
|
- ".yardopts"
|
81
81
|
- Berksfile
|
82
|
+
- CHANGELOG.md
|
82
83
|
- Gemfile
|
83
84
|
- LICENSE
|
84
85
|
- README.md
|
@@ -91,7 +92,9 @@ files:
|
|
91
92
|
- lib/poise_python/python_command_mixin.rb
|
92
93
|
- lib/poise_python/python_providers.rb
|
93
94
|
- lib/poise_python/python_providers/base.rb
|
95
|
+
- lib/poise_python/python_providers/dummy.rb
|
94
96
|
- lib/poise_python/python_providers/portable_pypy.rb
|
97
|
+
- lib/poise_python/python_providers/portable_pypy3.rb
|
95
98
|
- lib/poise_python/python_providers/scl.rb
|
96
99
|
- lib/poise_python/python_providers/system.rb
|
97
100
|
- lib/poise_python/resources.rb
|
@@ -114,6 +117,8 @@ files:
|
|
114
117
|
- test/gemfiles/master.gemfile
|
115
118
|
- test/integration/default/serverspec/default_spec.rb
|
116
119
|
- test/spec/python_command_mixin_spec.rb
|
120
|
+
- test/spec/python_providers/dummy_spec.rb
|
121
|
+
- test/spec/python_providers/portable_pypy3_spec.rb
|
117
122
|
- test/spec/python_providers/portable_pypy_spec.rb
|
118
123
|
- test/spec/python_providers/scl_spec.rb
|
119
124
|
- test/spec/python_providers/system_spec.rb
|
@@ -124,7 +129,7 @@ files:
|
|
124
129
|
- test/spec/spec_helper.rb
|
125
130
|
- test/spec/utils/python_encoder_spec.rb
|
126
131
|
- test/spec/utils_spec.rb
|
127
|
-
homepage: https://github.com/poise/python
|
132
|
+
homepage: https://github.com/poise/poise-python
|
128
133
|
licenses:
|
129
134
|
- Apache 2.0
|
130
135
|
metadata: {}
|
@@ -157,6 +162,8 @@ test_files:
|
|
157
162
|
- test/gemfiles/master.gemfile
|
158
163
|
- test/integration/default/serverspec/default_spec.rb
|
159
164
|
- test/spec/python_command_mixin_spec.rb
|
165
|
+
- test/spec/python_providers/dummy_spec.rb
|
166
|
+
- test/spec/python_providers/portable_pypy3_spec.rb
|
160
167
|
- test/spec/python_providers/portable_pypy_spec.rb
|
161
168
|
- test/spec/python_providers/scl_spec.rb
|
162
169
|
- test/spec/python_providers/system_spec.rb
|