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

Use a modern version of SQLite3 #93

Merged
merged 1 commit into from
Apr 12, 2017
Merged

Use a modern version of SQLite3 #93

merged 1 commit into from
Apr 12, 2017

Conversation

NathanDunfield
Copy link
Contributor

This patch has "build.sh" install a recent version of SQLite3 (3.16.2) into /usr/local/lib prior to building all the Pythons. The motivation is two-fold:

  • First, it fixes issue sqlite3 is broken under Python 3.6 #90, namely that sqlite3 is broken under Python 3.6.

  • Second, the version of SQLite3 that comes with Centos5 is very old, prior to the signifiant changes of SQLite 3.6.0 which itself was released in mid-2008. This causes problems when building a Python module that relies on any of these SQLite features, since (a) one can't run the doctests and (b) things like Sphinx's autodoc only work if you can actually import the module.

I have successfully tested the resulting Docker container by building wheels for this project.

@NathanDunfield
Copy link
Contributor Author

@njsmith, @ogrisel: Any chance of getting this pull request accepted? Thanks!

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2017

If you build a python module with a recent version of sqlite3 we expect that the module has no build dependency (does not directly link to libsqlite3 via a compiled extension) but instead uses the pure Python API, right? In that case it should note be a problem to use a more recent version in the manylinux docker container.

@ogrisel
Copy link
Contributor

ogrisel commented Mar 31, 2017

Wouldn't it be better to pass "/usr" as the prefix instead of the default (I assume) "/usr/local" prefix in ./configure?

@njsmith @rmcgibbo any opinion?

@NathanDunfield
Copy link
Contributor Author

@ogrisel: Yes, this is in the context of using the pure Python API only, not directly linking to libsqlite3. The problem is that the old sqlite3 in Centos5 doesn't accept certain newer commands in Sqlite3's dialect of SQL, but such SQL commands are just sent from Python to Sqlite3 as strings.

@NathanDunfield
Copy link
Contributor Author

@ogrisel: Yes, libsqlite3.so ends up in /usr/local/lib.

@NathanDunfield
Copy link
Contributor Author

@ogrisel: I put the new sqlite3 in "/usr/local/lib" rather than "/usr/lib" for the benefit of any Centos 5 packages that depend on sqlite3. Also, if I had installed in "/usr/lib" then I'd have clobbered files that should be under the package manager's control.

Given your setup, it might make the most sense to set the prefix to something in "/opt", say, "/opt/sqlite3" but then of course you'd need to add a flag to each Python configuration script to make it find that version --- with "/usr/local" this is automatic.

@ogrisel
Copy link
Contributor

ogrisel commented Apr 3, 2017

I think using "/usr/local/lib" is good if Python can find there by default.

@ogrisel
Copy link
Contributor

ogrisel commented Apr 12, 2017

@njsmith @rmcgibbo I think we should merge this one. Any reason not to do so?

@njsmith
Copy link
Member

njsmith commented Apr 12, 2017

No objection.

@ogrisel ogrisel merged commit 43082dd into pypa:master Apr 12, 2017
@ogrisel
Copy link
Contributor

ogrisel commented Apr 12, 2017

Ok merged.

@NathanDunfield
Copy link
Contributor Author

@ogrisel, @njsmith: Many thanks, I really appreciate you incorporating this!

grzanka added a commit to grzanka/manylinux that referenced this pull request Apr 18, 2017
* update openssl fetch

Committer: Robin Becker <robin@reportlab.com>

* Use $TRAVIS_COMMIT as image tag

* Use TRAVIS_COMMIT in deploy.sh

* Empty commit to trigger update to auditwheel 1.5.0 (pypa#81)

* Patch libc headers to make them compatible with C99 inline semantics

Closes: pypa#86

* Add 3.6.0 to CPython versions to build

Closes pypagh-82

* Update to latest bugfix releases of older Python versions

* FIX missing symlink to pip

Also make sure that calls to rm never ask for interactive
confirmation.

* Use Python 3.6 to install certifi and auditwheel

* Split travis build into 2 parallel jobs

* Use the trusty image

This is hopefully a workaround to use the docker service with a build
matrix:

travis-ci/travis-ci#5448

* Update to Python 3.4.6 and Python 3.5.3

* Update OPENSSL_ROOT to latest release [k] (current specified one [j] does not
exist anymore in the OPENSSL_DOWNLOAD_URL ftp repo.)

* README: python 3.6

* BF: use vault repositories for EOL CentOS 5

Main repositories for CentOS 5 now offline; point yum at
vault.centos.org (via IP to specialize to a particular server).

* Reference specific 5.11 release instead of version 5

Also switched the IP address for the DNS name to avoid any future
surprises. Fixes pypa#103

Credit for this fix goes out to Ryan Walker (@ryandub) and Lars Butler
(@larsbutler).

* Changed build.sh to compile SQLite3 from source and install in /usr/local. (pypa#93)

* Bundle copy of epel-release-5.4.noarch.rpm
dan-blanchard pushed a commit to Parsely/manylinux that referenced this pull request Jun 8, 2017
@mayeut mayeut mentioned this pull request May 22, 2021
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

Successfully merging this pull request may close these issues.

3 participants