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

Port examples #6210

merged 1 commit into from Jul 21, 2018


None yet
3 participants
Copy link

Eric-Arellano commented Jul 20, 2018

Part of #6062

This folder was unlike any we've worked with. Because it's a dist, you aren't allowed to include future as a 3rd party library. So we unfortunately can't use the backports.

I also couldn't find tests for the particular folder

cc @CMLivingston if you could help review please.

@@ -8,8 +8,8 @@
from distutils.core import Extension

c_module = Extension(str('c_greet'), sources=[str('c_greet.c')])
cpp_module = Extension(str('cpp_greet'), sources=[str('cpp_greet.cpp')])
c_module = Extension(b'c_greet', sources=[b'c_greet.c'])

This comment has been minimized.


Eric-Arellano Jul 20, 2018


I'm assuming the call to str() around string literals was to convert into byte strings, because from __future__ import unicode_literals is toggled on? If not, and unicode works, we can remove both b prefix and str().

@@ -14,7 +14,7 @@
# This is for testing purposes so we can assert that setup_requires is functioning
# correctly (because Pants swallows print statements).
if os.getenv('PANTS_TEST_SETUP_REQUIRES', ''):
output = [str(pycountry)]
output = [bytes(pycountry)]

This comment has been minimized.


Eric-Arellano Jul 20, 2018


Assuming similar logic here that you want bytes instead of unicode?

If you want unicode, I don't know of a Py2 Py3 compatible way of specifying we want unicode because we can't import six or future. unicode() is only supported in Py2.

@stuhood stuhood requested review from CMLivingston and cosmicexplorer Jul 20, 2018

Copy link

stuhood left a comment

Works for me.

@CMLivingston : PTAL.

Copy link

CMLivingston left a comment

You are correct, these need to be bytes and not unicode.

@stuhood stuhood merged commit a783046 into pantsbuild:master Jul 21, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@Eric-Arellano Eric-Arellano deleted the Eric-Arellano:port-examples branch Jul 22, 2018

CMLivingston pushed a commit to CMLivingston/pants that referenced this pull request Aug 27, 2018

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