Re: [gdal-dev] GDAL version in pip requirements file

2023-09-28 Thread Kurt Schwehr via gdal-dev
I am not sure if there is anything in this, but take a look at https://packaging.python.org/en/latest/guides/ Also, I might suggest avoiding command line solutions. You can get the version from the python module On Mon, Sep 25, 2023, 11:55 PM Luca Delucchi via gdal-dev < gdal-dev@lists.osgeo.org>

Re: [gdal-dev] GDAL version in pip requirements file

2023-09-28 Thread Luca Delucchi via gdal-dev
Il mar 26 set 2023, 09:07 Stefan Blumentrath ha scritto: > Hi Luca, > Hi Stefan, > > You could parse the gdal config version output into an environment > variable and then specify the version in requirements.txt like this: > GDAL==${GDAL_VERSION} > Thanks a lot it looks a good solution > > Ch

Re: [gdal-dev] GDAL version in pip requirements file

2023-09-28 Thread Luca Delucchi via gdal-dev
Hi Peter, Il mar 26 set 2023, 16:33 Peter Schmitt ha scritto: > I know you mention requirements.txt, but I write my setup.py with a > function that uses gdal-config to get Python bindings for the version of > GDAL I have installed. It looks something like this: > Thanks for your help but I'm l

Re: [gdal-dev] GDAL version in pip requirements file

2023-09-26 Thread Peter Schmitt via gdal-dev
I know you mention requirements.txt, but I write my setup.py with a function that uses gdal-config to get Python bindings for the version of GDAL I have installed. It looks something like this: from setuptools import setup, find_packages from subprocess import check_output class GdalNotFoundErro

Re: [gdal-dev] GDAL version in pip requirements file

2023-09-26 Thread Stefan Blumentrath via gdal-dev
Hi Luca,You could parse the gdal config version output into an environment variable and then specify the version in requirements.txt like this:GDAL==${GDAL_VERSION}Cheers,StefanOn 26/09/2023, 08:55 Luca Delucchi via gdal-dev wrote: Hi everyone, I would like to know if it is possible

[gdal-dev] GDAL version in pip requirements file

2023-09-25 Thread Luca Delucchi via gdal-dev
Hi everyone, I would like to know if it is possible to set GDAL version in the pip requirements file using gdal-config of the machine running the installation, I tried some different ways but I was not able to do it, also leaving GDAL without any specified version doesn't work because it takes the