michelp / postgresql-wheel

A Python wheel containing PostgreSQL
Apache License 2.0
78 stars 16 forks source link

Package version above 14.1.0 does not install binaries #7

Open louis-van-der-stam opened 2 years ago

louis-van-der-stam commented 2 years ago

When installing the latest (14.1.2) vesion from pypi.org the bin directory (python3.8/site-packages/postgresql/bin) remains empty. The same happens for 14.1.1. When installing 14.1.0 the bin directory is populated. Am I missing how to install or did something go wrong with packaging. I'm using Python 3.8.13 on Linux

aferdyp commented 2 years ago

The manylinux version currently being used by cibuildwheel is based on CentOS 7. The github action to build the wheel uses the "apt" version of Linux. The easiest fix here is to replace CIBW_BEFORE_ALL_LINUX: ${{ format('bash src/tools/install_pg.sh {0}', github.ref) }} with CIBW_BEFORE_ALL_LINUX: ${{ format('bash src/tools/install_pg_rpm.sh {0}', github.ref) }} in wheels.yml

The downside here is that install_pg_rpm.sh does not include the build steps for postgis. The postgis build does not work quite well with CentOS 7. The dependencies are really old to get postgis 3.2 setup out of the box.

louis-van-der-stam commented 2 years ago

Thanks for looking into this.

It reads like it is a problem when creating the package? If it is a problem when installing, then I'm lost with the explanation/instruction.

Can you help me out?

aferdyp commented 2 years ago

It basically does come down to a problem with creating the package. I have raised a PR with the required change.

The process of building the wheel using cibuildwheel is dependent on using github actions. If you want to get a build for your own requirements (till the PR is approved), here's what you could possibly do -

louis-van-der-stam commented 2 years ago

Thanks for explaining, I'm okay with using the somewhat older version. Just wanted to flag the problem and then understand the cause. Again thanks for looking into this and making the package available!