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

'_shim.pyx' doesn't match any files using GDAL 3.x #798

Closed
tarnh opened this issue Oct 6, 2019 · 4 comments
Closed

'_shim.pyx' doesn't match any files using GDAL 3.x #798

tarnh opened this issue Oct 6, 2019 · 4 comments
Assignees
Milestone

Comments

@tarnh
Copy link

tarnh commented Oct 6, 2019

Operating system

ArchLinux with Python 3.7.4 & gcc 9.2.0

Fiona and GDAL version and provenance

fiona: git master
gdal: 3.0.1
python setup.py build_ext fails:

Traceback (most recent call last):
  File "setup.py", line 238, in <module>
    compiler_directives={"language_level": "3"}
  File "/usr/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 966, in cythonize
    aliases=aliases)
  File "/usr/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 810, in create_extension_list
    for file in nonempty(sorted(extended_iglob(filepattern)), "'%s' doesn't match any files" % filepattern):
  File "/usr/lib/python3.7/site-packages/Cython/Build/Dependencies.py", line 109, in nonempty
    raise ValueError(error_msg)
ValueError: 'fiona/_shim.pyx' doesn't match any files
@snorfalorpagus
Copy link
Member

Fiona doesn't currently support GDAL 3.x. For now, if you want to use Fiona you're going to have to downgrade to 2.x.

I'm going to leave this issue open as this particular error is actually a problem with setup.py not handling the version number correctly, with an if-ifelse with no catchall else.

Fiona/setup.py

Lines 214 to 225 in d6ec15f

if gdalversion.startswith("1"):
shutil.copy('fiona/_shim1.pyx', 'fiona/_shim.pyx')
shutil.copy('fiona/_shim1.pxd', 'fiona/_shim.pxd')
elif gdal_major_version == 2:
if gdal_minor_version >= 2:
log.info("Building Fiona for gdal 2.2+: {0}".format(gdalversion))
shutil.copy('fiona/_shim22.pyx', 'fiona/_shim.pyx')
shutil.copy('fiona/_shim22.pxd', 'fiona/_shim.pxd')
else:
log.info("Building Fiona for gdal 2.0.x-2.1.x: {0}".format(gdalversion))
shutil.copy('fiona/_shim2.pyx', 'fiona/_shim.pyx')
shutil.copy('fiona/_shim2.pxd', 'fiona/_shim.pxd')

@snorfalorpagus snorfalorpagus changed the title Cython compilation error '_shim.pyx' doesn't match any files using GDAL 3.x Oct 6, 2019
@snorfalorpagus snorfalorpagus modified the milestone: 1.9 Oct 6, 2019
@snorfalorpagus
Copy link
Member

Also just noticed the mixed use of gdalversion/gdal_major_version .

@sgillies
Copy link
Member

This is addressed by #804.

@sgillies sgillies added this to the 1.8.9 milestone Oct 18, 2019
@sgillies sgillies self-assigned this Oct 18, 2019
@sgillies
Copy link
Member

Done!

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

No branches or pull requests

3 participants