carsonyl / pypac

Find and use proxy auto-config (PAC) files with Python and Requests.
https://pypac.readthedocs.io
Apache License 2.0
71 stars 19 forks source link

Cannot build on Linux (tested on Ubuntu 16.04) #30

Closed maximinus closed 6 years ago

maximinus commented 6 years ago

Cannot install a built wheel on Ubuntu (tested with Ubuntu 16.04/ pypac 0.10.1 / Python 3.5.4)

git clone https://github.com/carsonyl/pypac.git
cd pypac
python setup.py bdist_wheel
cd dist
pip install pypac-0.10.1-py2-py3-none-any.whl

FileNotFoundError: [Errno 2] No such file or directory: '/System/Library/CoreServices/SystemVersion.plist'

This is probably related to the line

pyobjc-framework-SystemConfiguration >= 3.2.1; sys.platform=="darwin"

in setup.py; but changing to 'linux' and rebuilding gives the same error.

maximinus commented 6 years ago

A fix for Linux is to simply remove line 19 of setup.py so that pyobjc-framework-SystemConfiguration is not required. This works on Ubuntu 16.04 for me, but I don't know the repercussions of this on Windows / Mac so have not issued a pull request.

carsonyl commented 6 years ago

Maybe it should be sys_platform instead of sys.platform. Could you test that for me, please?