pystruct / pyqpbo

QPBO interface and alpha expansion for Python
23 stars 14 forks source link

Update setup.py, fix Python 3.x setup #7

Closed ygdkn closed 9 years ago

amueller commented 9 years ago

Could you please change it to only import urllib.request? The other import seems redundant.

ygdkn commented 9 years ago

No I can't. It will broke Python 2.x setup. I rewrote a bit and tested on two versions - 2.7 and 3.4. Works fine.

amueller commented 9 years ago

Ok, that seems fine to me.

ygdkn commented 9 years ago

@amueller Can you update https://pypi.python.org/pypi/pyqpbo/ ?

amueller commented 9 years ago

You can also use pip with a github repo. I usually only update pipy for major changes.

ygdkn commented 9 years ago

But I think it's a pretty critical change. I can't install pystruct using pip on Python 3 without manual installation of pyqpbo from repo.

amueller commented 9 years ago

PyQPBO is not a requirement for PyStruct ;) But I updated pypi anyhow.

ygdkn commented 9 years ago

@amueller Thank you! But are you sure?

sudo pip3 install pystruct

Downloading/unpacking pystruct Running setup.py (path:/tmp/pip_build_root/pystruct/setup.py) egg_info for >package pystruct

warning: no files found matching '' under directory 'tests' warning: no previously-included files matching '.pyc' found under directory >'doc' warning: no previously-included files matching '.pyo' found under directory >'doc' warning: no previously-included files matching '.pyc' found under directory >'tests' warning: no previously-included files matching '*.pyo' found under directory >'tests' no previously-included directories found matching 'docs/_build' no previously-included directories found matching 'docs/auto_examples' no previously-included directories found matching 'docs/generated' Requirement already satisfied (use --upgrade to upgrade): ad3 in >/usr/local/lib/python3.4/dist-packages (from pystruct) Downloading/unpacking pyqpbo (from pystruct) Running setup.py (path:/tmp/pip_build_root/pyqpbo/setup.py) egg_info for >package pyqpbo

Installing collected packages: pystruct, pyqpbo Running setup.py install for pystruct

..... Compiler output .....

Successfully installed pystruct pyqpbo Cleaning up...

amueller commented 9 years ago

Depends on you definition of requirement. It is recommended and included in the requirements.txt, but you can use pystruct without it.

ygdkn commented 9 years ago

Ok :) Thank you!