Closed karljchan closed 12 months ago
Looking for the issue with the --enable-new-dtags
, I found the following issue related to setuptools
(https://github.com/pypa/distutils/issues/171).
I remember that a while ago @DWesl was providing a pull request in the basemap
repository to ensure that basemap
can be built from the source distribution on PyPI, with Cygwin as particular target (https://github.com/matplotlib/basemap/pull/532). So at some point the basemap
source distribution was working for Cygwin.
We might need here a similar patch to the one given by @DWesl for pyproj
(https://github.com/pyproj4/pyproj/pull/1120).
Most likely this section needs to be run when sys.platform == "cygwin"
, not just when os.name == "nt"
https://github.com/matplotlib/basemap/blob/231f40af18e716f8d04964f667cf3a3e7d0bd656/packages/basemap/setup.py#L114-L124
@karljchan I installed Cygwin on my Windows machine but I am unable to reproduce your issue (after installing Cython<3.0.0
manually because the latest version is currently incompatible with _geoslib.pyx
):
vic@onyx ~
$ python -m pip install --no-deps --no-build-isolation basemap
Collecting basemap
Downloading basemap-1.3.7.zip (156 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 156.4/156.4 kB 3.5 MB/s eta 0:00:00
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: basemap
Building wheel for basemap (pyproject.toml) ... done
Created wheel for basemap: filename=basemap-1.3.7-cp39-cp39-cygwin_3_4_7_x86_64.whl size=237214 sha256=501cf30c38e5db3ac24f7e28ce0123d44e096b1a1bb966b080afeb7472901d7b
Stored in directory: /home/vic/.cache/pip/wheels/da/26/26/75a84a37edb0066d0540073637bcb40a38e3e8ad02028a930f
Successfully built basemap
Installing collected packages: basemap
Successfully installed basemap-1.3.7
May I ask you to provide a bit more of information on your current Cygwin installation? For example, Python version and GCC version. I am using Python 3.9.16 and GCC 11.4.0.
Still I will apply the suggestion by @DWesl, since your issue appeared already in other projects and the modification is probably harmless.
I suspect that's due to setting GEOS_DIR
or PROJ_DIR
; you can set those to /usr
if using the Cygwin packages, or installing them yourself defaults to /usr/local
.
The other part might be that they've installed GEOS to /usr/local
: I'm not sure what precisely that would change, but /usr/
often gets special treatment.
There's a PR with the proposed changes in #582
@DWesl Thanks! We were just editing at the same time! Give me just a moment to see how I can merge your PR into the hotfix-1.3.8
branch.
That's what I get for leaving the PR for two weeks, I suppose
@karljchan, does the hotfix-1.3.8
branch install for you?
@karljchan You can try to see if the hotfix-1.3.8
branch works for you with the following command:
python -m pip install --no-build-isolation git+https://github.com/matplotlib/basemap.git@hotfix-1.3.8#subdirectory=packages/basemap
@DWesl I downgraded the numpy
minimum dependency from 1.22 to 1.21 because I saw that numpy
is not so up to date in the Cygwin packages. Does the hotfix-1.3.8
branch work for you? In my computer it works, but on the other hand v1.3.7
was also working.
I pasted that command into a terminal; we'll see what happens in about ten minutes.
I also update NumPy regularly, so I have 1.24.3.
@DWesl Did the hotfix-1.3.8
branch install successfully in the end?
On 7/24/2023 1:25 PM, Víctor wrote:
@DWesl Did the |hotfix-1.3.8| branch install successfully in the end?
The first time doesn't seem to have actually run the command, but it installed 1.3.7 fine just now.
Cool! I will wait for @karljchan's feedback until end of the week before closing the issue, let's see if I can prepare the 1.3.8 patch release by then.
@karljchan Did you have time to check if the hotfix-1.3.8
branch is working for your use case?
Hi, apologies @molinav for getting back to you so late regarding this issue as I have been away from office.
I have tried applying the hotfix that you’ve provided and the installation is successful! I appreciate your assistance very much!
@karljchan No worries! Great to hear that it is working now. I will prepare the v1.3.8 patch release in the upcoming days and this fix will be included.
Thanks also to @DWesl for providing the PR with the bugfix!
Hello all, I am trying to install basemap package on cygwin but have encountered an error. Before the installation, i have installed GEOS and PROJ from source and have set the GEOS_DIR/PROJ_DIR environment variable.
I have tried installing basemap from a previous thread here #539 by downloading basemap via python -m pip install basemap but failed to build wheel for basemap.
I would appreciate any help or guidance you can provide, thank you.