Skip to content

Commit

Permalink
Adding support to differentiate packages by Python runtime.
Browse files Browse the repository at this point in the history
  • Loading branch information
nik committed Apr 23, 2017
1 parent e93133b commit 257e4fe
Show file tree
Hide file tree
Showing 20 changed files with 59 additions and 18 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 54 additions & 17 deletions lambda_packages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,86 +5,123 @@
'bcrypt': {
'version': '3.1.1',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'bcrypt', 'bcrypt-3.1.1.tar.gz')
'bcrypt', 'python2.7-bcrypt-3.1.1.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'bcrypt', 'python2.7-bcrypt-3.1.1.tar.gz')
},
'cffi': {
'version': '1.7.0',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'cffi', 'cffi-1.7.0.tar.gz')
'cffi', 'python2.7-cffi-1.7.0.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'cffi', 'python2.7-cffi-1.7.0.tar.gz')
},
'cryptography': {
'version': '1.4',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'cryptography', 'cryptography-1.4.tar.gz')
'cryptography', 'python2.7-cryptography-1.4.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'cryptography', 'python2.7-cryptography-1.4.tar.gz')
},
'cv2': {
'version': '3.1.0',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'OpenCV', 'OpenCV-3.1.0.tar.gz')
'OpenCV', 'python2.7-OpenCV-3.1.0.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'OpenCV', 'python2.7-OpenCV-3.1.0.tar.gz')
},
'datrie_extended': {
'version': '0.7.3',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'datrie_extended', 'datrie_extended-0.7.3.tar.gz')
'datrie_extended', 'python2.7-datrie_extended-0.7.3.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'datrie_extended', 'python2.7-datrie_extended-0.7.3.tar.gz')
},
'lxml': {
'version': '3.6.0',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'lxml', 'lxml-3.6.0.tar.gz')
'lxml', 'python2.7-lxml-3.6.0.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'lxml', 'python2.7-lxml-3.6.0.tar.gz')
},
'misaka': {
'version': '2.0.0',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'misaka', 'misaka-2.0.0.tar.gz')
'misaka', 'python2.7-misaka-2.0.0.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'misaka', 'python2.7-misaka-2.0.0.tar.gz')
},
'MySQL-Python': {
'version': '1.2.5',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'MySQL-Python', 'MySQL-Python-1.2.5.tar.gz')
'MySQL-Python', 'python2.7-MySQL-Python-1.2.5.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'MySQL-Python', 'python2.7-MySQL-Python-1.2.5.tar.gz')
},
'numpy': {
'version': '1.10.4',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'numpy', 'numpy-1.10.4.tar.gz')
'numpy', 'python2.7-numpy-1.10.4.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'numpy', 'python2.7-numpy-1.10.4.tar.gz')
},
'Pillow': {
'version': '3.4.2',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'Pillow', 'Pillow-3.4.2.tar.gz')
'Pillow', 'python2.7-Pillow-3.4.2.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'Pillow', 'python2.7-Pillow-3.4.2.tar.gz')
},
'psycopg2': {
'version': '2.6.1',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'psycopg2', 'psycopg2-2.6.1.tar.gz')
'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'psycopg2', 'python2.7-psycopg2-2.6.1.tar.gz')
},
'pycrypto': {
'version': '2.6.1',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'pycrypto', 'pycrypto-2.6.1.tar.gz')
'pycrypto', 'python2.7-pycrypto-2.6.1.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'pycrypto', 'python2.7-pycrypto-2.6.1.tar.gz'),
'python3.6-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'pycrypto', 'python3.6-pycrypto-2.6.1.tar.gz')
},
'pynacl': {
'version': '1.0.1',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'PyNaCl', 'PyNaCl-1.0.1.tar.gz')
'PyNaCl', 'python2.7-PyNaCl-1.0.1.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'PyNaCl', 'python2.7-PyNaCl-1.0.1.tar.gz')
},
'pyproj': {
'version': '1.9.5',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'pyproj', 'pyproj.4-4.9.2.tar.gz')
'pyproj', 'python2.7-pyproj.4-4.9.2.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'pyproj', 'python2.7-pyproj.4-4.9.2.tar.gz')
},
'python-ldap': {
'version': '2.4.29',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'python-ldap', 'python-ldap-2.4.29.tar.gz')
'python-ldap', 'python2.7-python-ldap-2.4.29.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'python-ldap', 'python2.7-python-ldap-2.4.29.tar.gz')
},
'python-Levenshtein': {
'version': '0.12.0',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'python-Levenshtein', 'python-Levenshtein-0.12.0.tar.gz')
'python-Levenshtein', 'python2.7-python-Levenshtein-0.12.0.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'python-Levenshtein', 'python2.7-python-Levenshtein-0.12.0.tar.gz')

},
'regex': {
'version': '2016.8.27',
'path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'regex', 'regex-2016.8.27.tar.gz')
'regex', 'python2.7-regex-2016.8.27.tar.gz'),
'python2.7-path': os.path.join(os.path.dirname(os.path.abspath(__file__)),
'regex', 'python2.7-regex-2016.8.27.tar.gz')
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
6 changes: 5 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

def test_packages():
for name, details in lambda_packages.items():
assert_true(os.path.exists(details['path']))
assert_true(os.path.exists(details['path']))
assert_true(os.path.exists(details['python2.7-path']))

if 'python3.6' in details:
assert_true(os.path.exists(details['python3.6-path']))

0 comments on commit 257e4fe

Please sign in to comment.