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

add exclude option in setup.py #254 #255

Merged
merged 1 commit into from Jan 13, 2016

Conversation

Projects
None yet
3 participants
@yoshiya0503
Contributor

yoshiya0503 commented Jun 12, 2015

Hi team.

I created the issue and PR.
see #254

Best regards.


Yoshiya Ito

@bitprophet

This comment has been minimized.

Member

bitprophet commented Jun 13, 2015

Oh neat, I didn't know about this feature of find_packages, this will definitely help a lot of folks who are being bitten by this issue. Thank you! Adding to release milestone.

@bitprophet bitprophet added this to the 0.11 milestone Jun 13, 2015

@yoshiya0503

This comment has been minimized.

Contributor

yoshiya0503 commented Jun 13, 2015

Thank you for your reply!
Any time! :)

@bitprophet

This comment has been minimized.

Member

bitprophet commented Jul 10, 2015

Side note, a user claimed in #258 that the pyyaml SyntaxError on install, wasn't present in master. I'm guessing that may be something else at work since we haven't merged this PR yet and I don't recall other recent changes that would affect the vendored pyyaml. But, worth verifying.

@yoshiya0503

This comment has been minimized.

Contributor

yoshiya0503 commented Jul 11, 2015

Hi.

I verified the issue #258 following environment, and I reproduce #258 install error.
Mac OSX v10.10.4 (OS is so irrelevant about #258)
pip v1.5.6
python v2.7.9

I hope this information will help you.
Best Regards.

[root cause]
The root cause of #258 is that yaml3 is installed despite of using python2.7x virtualenv.
In fact, the following syntax is valid only python3.

class YAMLObject(metaclass=YAMLObjectMetaclass):
...

By merging this PR, it will be avoidable the install error.
However, as you said, there is also other cause.
That is to say, the cause of #258 is that users are using pip v1.5.6.
pip1.5.x compile the 3rd-party libs during install.(.pyc)
(the message of compiling appears to be using the pip1.5.x)
Then, yaml3(for python3) compiling caused the error in the case of using python 2.x of virtualenv.

[easy solution]
try following.
(your virtualenv)> pip install --upgrade pip
and try again
(your virtualenv)> pip install invoke

[investigation log]

virtualenv Invoke
New python executable in Invoke/bin/python
Installing setuptools, pip...done.

cd Invoke
source ./bin/activate
pip install -U pip==1.5.6
pip --version
pip 1.5.6 from /Users/itouyoshiya/Documents/Python/Invoke/lib/python2.7/site-packages (python 2.7)

pip install invoke
Downloading/unpacking invoke
Downloading invoke-0.10.1-py2.py3-none-any.whl (166kB): 166kB downloaded
Installing collected packages: invoke
Compiling /Users/itouyoshiya/Documents/Python/Invoke/build/invoke/invoke/vendor/yaml3/init.py ...
File "/Users/itouyoshiya/Documents/Python/Invoke/build/invoke/invoke/vendor/yaml3/init.py", line 284
class YAMLObject(metaclass=YAMLObjectMetaclass):
^
SyntaxError: invalid syntax

Successfully installed invoke
Cleaning up...

@ivoflipse

This comment has been minimized.

ivoflipse commented Dec 29, 2015

I'm currently having a similar problem where conda (the package manager) also compiles files from the yaml3 folder and thus fails my CI build. If I could make sure that it didn't get included in the Python 2.7 package to begin with, this could be prevented.

So it would be great if this got merged in, so I can easily keep creating conda packages for invoke

@bitprophet

This comment has been minimized.

Member

bitprophet commented Dec 31, 2015

Yup this is in the 0.12 milestone and I plan to cut 0.12 any day now (already kicked most of the stuff I can't easily knock out, to 0.13, but not this one!). Sorry it's taken a while!

@ivoflipse

This comment has been minimized.

ivoflipse commented Dec 31, 2015

Thanks for the heads up! Looking forward to 0.12 then

@bitprophet

This comment has been minimized.

Member

bitprophet commented Jan 13, 2016

For the record, I can't trivially recreate this problem with pip 7.1.2 from a Python 2 host environment (re: virtualenv creation). E.g. virtualenv --python=python3 blah && source blah/bin/activate && pip install <master invoke path> doesn't kaboom.

That's not to say I don't believe this problem exists, it's definitely gotten enough reports - just noting that I'm about to merge an updated copy of this PR but without being able to verify it. Gonna be relying on @yoshiya0503 @matheo @ivoflipse etc to verify it for me :) please check out latest master or release version 0.12.0 and let me know if it corrects the issue for you!

I'll probably release things as-is without waiting, but happy to cut another emergency bugfix release should I have incorrectly applied the fix.

@bitprophet bitprophet merged commit 68e2fad into pyinvoke:master Jan 13, 2016

1 of 2 checks passed

continuous-integration/appveyor AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

bitprophet added a commit that referenced this pull request Jan 13, 2016

@ivoflipse

This comment has been minimized.

ivoflipse commented Jan 13, 2016

I didn't get the problem using pip, but while building an invoke package using conda. It tries to compile all the .py files in the package, which obviously fails if Python 3 code is run while building for Python 2.

Having this filtering step would make my life easier :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment