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

Travis CI testing with Python 3.5+ #25

Closed
johntruckenbrodt opened this issue Mar 12, 2018 · 5 comments
Closed

Travis CI testing with Python 3.5+ #25

johntruckenbrodt opened this issue Mar 12, 2018 · 5 comments
Labels

Comments

@johntruckenbrodt
Copy link
Owner

The current Travis OS is Ubuntu Trusty, which comes with Python 3.4. Testing with Python 3.5 or 3.6 is not possible because system site packages need to be enabled and this seems to only work with the OS-installed Python version. Is there a way to still test the other versions?

@ibaris
Copy link
Contributor

ibaris commented Mar 12, 2018

Do you have already tried something like this at the travis configuration file?

python:
- "3.5_with_system_site_packages"```

@felixcremer
Copy link
Collaborator

We can try to use pygdal to install the python gdal bindings.
I can get the python2.7 test going with these changes to the .travis.yml:
python:

  • "2.7"
  • "3.4"
  • "3.5"

virtualenv:
before_script:

install:

  • pip install -r requirements.txt
  • pip install coveralls
  • pip install coverage
  • pip install "pygdal>=2.1.3,<=2.1.3.999"
  • python setup.py install

before_install:

  • sudo add-apt-repository ppa:ubuntugis/ppa -y
  • sudo apt-get update -q
  • sudo apt-get install gdal-bin python-gdal python3-gdal libproj-dev libgdal1-dev -y
  • pip install -U pip

Unfortunately, in python 3 I get an import error. The importing of ogr fails.

@ibaris
Copy link
Contributor

ibaris commented Mar 15, 2018

Unfortunately, in python 3 I get an import error. The importing of ogr fails.
This is exactly the same error that I got. And I tried with all of my packages and the result is always the same.

@Echelon9
Copy link
Contributor

After some dependency wrangling, I've got a WIP patch that works testing Python 3.4 - 3.7 on Travis-CI.
See: https://travis-ci.org/Echelon9/pyroSAR/builds/455867555

Changes required before the patch could be properly upstreamed:

  • Clean up the documentation.
  • Confirm this doesn't regress Windows CI on appveyor.
  • Resolve the Python 2.7 only problem with sqlite dependencies [appears unrelated to this patch].

For discussion:

  • Preferred GDAL Python binding: Unofficial pygdal has some real problems, I would instead strongly recommend using the official gdal Python package to provide the bindings to the local libgdal-dev.

The benefits of using the official gdal Python package bindings are full support for Python 3, lockstep version releases alongside libgdal-dev, and with some clever scripting (see .travis.yml in the patch) it can be automated as part of the instructions to setup a development environment.

@johntruckenbrodt
Copy link
Owner Author

As of March 29, testing is now done with Python 3.5 in Ubuntu Xenial. This is currently the latest setup to support using system site packages

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

No branches or pull requests

4 participants