Skip to content
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

Pip install from cache does not include KCL jars #33

Closed
whummer opened this issue Nov 13, 2016 · 7 comments
Closed

Pip install from cache does not include KCL jars #33

whummer opened this issue Nov 13, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@whummer
Copy link

whummer commented Nov 13, 2016

We noticed that after the recent changes (fix of #28) the amazon_kclpy package has a bug regarding downloads of JAR files.

Steps to reproduce:

$ cd /tmp
$ virtualenv .venv
$ . .venv/bin/activate
$ pip install --no-cache amazon_kclpy
$ ls .venv/lib/python*/site-packages/amazon_kclpy/jars
__init__.py amazon-kinesis-client-1.7.2.jar aws-java-sdk-cloudwatch-1.11.14.jar ...
$ pip uninstall -y amazon_kclpy
$ pip install amazon_kclpy
$ ls .venv/lib/python*/site-packages/amazon_kclpy/jars
__init__.py

After the last step, the JAR files are missing in the jars directory. Would be great to get this fixed because most people will probably not use the --no-cache option on pip install, then the library becomes unusable.

@pfifer pfifer added the bug label Nov 14, 2016
@pfifer pfifer self-assigned this Nov 14, 2016
@pfifer
Copy link
Contributor

pfifer commented Nov 14, 2016

Thanks for the report. I'm looking into it.

@pfifer
Copy link
Contributor

pfifer commented Nov 15, 2016

What OS are you see this on? I do see this on macOS, while Amazon Linux appears to work fine.

@whummer
Copy link
Author

whummer commented Nov 15, 2016

Sorry, forgot to mention. Tested on MacOS 10.11.6, Python version 2.7.11

@pfifer
Copy link
Contributor

pfifer commented Nov 15, 2016

Thanks.
It seems to work fine on Amazon Linux. Install fails on macOS 10.11 and 10.12, and Windows (2016 Datacenter is what I'm testing on).

I have a fix, but it's somewhat hacky. It works by downloading the jars during the creation of the wheel, which appears to occur on the first installation of amazon_kclpy to the virtual environment.

@whummer
Copy link
Author

whummer commented Nov 16, 2016

Thanks for the fix, looks good to me. Any easy way I can test this branch on my machine via "pip install ..."?

@pfifer
Copy link
Contributor

pfifer commented Nov 17, 2016

I hope to have the release ready soon, but for testing you can do this:

  1. Download the source for the module, and run python setup.py sdist.
    This will create dist/amazon_kclpy-1.4.0.tar.gz
  2. Create and activate the virtual environment as normal
  3. Install the KCL dependencies
  pip install boto
  pip install argparse
  pip install mock
  pip install amazon_kclpy --no-index --find-links <path to the dist directory>

The dependencies need to be installed separately since the installation of the amazon_kclpy won't be able to resolve dependendencies from PyPI.

@pfifer pfifer added this to the v1.4.1 milestone Nov 18, 2016
pfifer added a commit that referenced this issue Nov 18, 2016
* Installation of the library into a virtual environment on macOS, and Windows now correctly downloads the jar files.
  * Fixes [Issue #33](#33)
@pfifer
Copy link
Contributor

pfifer commented Nov 18, 2016

Version 1.4.1 has been released that fixes this:
Release Page
PyPI Page

@pfifer pfifer closed this as completed Nov 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants