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

byte vs str breakage in setup #46

Closed
RhysU opened this issue Feb 27, 2017 · 4 comments
Closed

byte vs str breakage in setup #46

RhysU opened this issue Feb 27, 2017 · 4 comments

Comments

@RhysU
Copy link

RhysU commented Feb 27, 2017

When I've cloned the repo into directory CyLP I'm seeing pip install git+file://$(readlink -f CyLP) break while trying to write pip-egg-info/cylp.egg-info/PKG-INFO because of TypeError: a bytes-like object is required, not 'str' way down in the Python 3.5 distutils in some rfc822_escape method.

Per http://stackoverflow.com/questions/33054527/python-3-5-typeerror-a-bytes-like-object-is-required-not-str this looks to be a problem with some README/LICENSE stuff. Indeed, removing such content from setup.py...

diff --git a/setup.py b/setup.py
index afef50a..ea350fb 100644
--- a/setup.py
+++ b/setup.py
@@ -403,12 +403,6 @@ extra_files = ['cpp/*.cpp', 'cpp/*.hpp', 'cpp/*.h', 'VERSION']

 setup(name='cylp',
       version=VERSION,
-      description=DESC,
-      long_description=s_README,
-      author=s_AUTHORS,
-      author_email=AUTHOR_EMAIL,
-      url=URL,
-      license=s_LICENSE,
       packages=['cylp', 'cylp.cy', 'cylp.py', 'cylp.py.pivots', 'cylp.py.modeling',
                 'cylp.py.utils', 'cylp.py.mip','cylp.py.QP'],
       cmdclass=cmdclass,

...gets past the problem.

Do you unintentionally have binary-ish characters somewhere in those files? Can you confirm/deny the installation behaves as expected on Python 3.5?

@tkralphs
Copy link
Member

tkralphs commented Mar 6, 2017

Although I have not tried it myself, my understanding is that CyLP does not currently install in Python 3. There is an open pull request (#28) that fixes this. I have tried to find the time to review this request and some of the other issues, but unfortunately, it hasn't happened yet. I'm looking for a way to get better support for this project, which seems to get a lot of use.

@scollis
Copy link
Contributor

scollis commented Mar 19, 2017

I need cylb for a project I am working on in Python 3.5 I will test out @jjhelmus branch

@tkralphs
Copy link
Member

I am also seeing this error as I try to install now in Python 3.6. I have to admit that I haven't completely understood what's happening here, but there is some mix of encodings that Python 3.5/3.6 doesn't seem to like and this hack does get past it. There's nothing binary'ish in any of the files that I can see. Unfortunately, getting past this only leads to another build error...

@tkralphs
Copy link
Member

This should be fixed now in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants