question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upgrading from 0.18 to 0.19 breaks my project's installation

See original GitHub issue

I just tried updating the versioneer files in my project from 0.18 to 0.19, however, this completely breaks my installation. I use a setup.py file that is a little more complicated than normal in that I need to compile a bunch of fortran files and modify the build classes. After upgrading to 0.19, I get the eerily uniformative error message:

/opt/miniconda3/envs/py38/lib/python3.8/site-packages/setuptools/dist.py:458: UserWarning: Normalizing 'v4.7.1+32.g2686b7b8.dirty' to '4.7.1+32.g2686b7b8.dirty'
      warnings.warn(tmpl.format(**locals()))
    error: unknown file type '.f95' (from 'src/PythonWrapper.f95')

Setting tag_prefix = 'v' in the setup.cfg file gets rid of the first warning, but the second error persists.

This error is so odd, that it took me a long time to even consider that versioneer was the problem. Replacing the versioneer.py and _version.py with the old versions confirms that versioneer 0.19 is the problem.

So, I have no idea how this could occur. I went through the instructions, and the only non-standard thing that I am doing is defining the cmdclass as folllows:

cmdclass = {'sdist': sdist, 'build': build, 'install': install, 'develop': develop}
cmdclass.update(versioneer.get_cmdclass())

Given that this worked beforehand, I suspect that this is not the problem.

Does anyone have any suggestions on how to debug this? I would like to to use 0.19!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
effigiescommented, Jul 20, 2021

@MarkWieczorek Should be fixed in 0.20. Please reopen if not.

0reactions
effigiescommented, Jan 15, 2021

There’s a secondary issue, which is that Versioneer’s build_ext does not subclass from a passed cmdclass[“build_ext”], which needs to be fixed.

Actually, that was fixed in #232. If you’re comfortable updating your versioneer to current master, then you should be able to fix this by updating your setup.py:

diff --git a/setup.py b/setup.py
index a1be43ae..92a014fe 100644
--- a/setup.py
+++ b/setup.py
@@ -20,11 +20,10 @@ import sysconfig  # noqa: E402
 import setuptools  # noqa: E402
 import numpy  # noqa: E402
 import versioneer  # noqa: E402
-from numpy.distutils.core import setup  # noqa: E402
+from numpy.distutils.core import setup, numpy_cmdclass  # noqa: E402
 from numpy.distutils.command.build import build as _build  # noqa: E402
 from numpy.distutils.command.install import install as _install  # noqa: E402
 from numpy.distutils.command.develop import develop as _develop  # noqa: E402
-from numpy.distutils.command.sdist import sdist  # noqa: E402
 from numpy.distutils.fcompiler import FCompiler  # noqa: E402
 from numpy.distutils.fcompiler import get_default_fcompiler  # noqa: E402
 from numpy.distutils.misc_util import Configuration  # noqa: E402
@@ -212,9 +211,9 @@ def configuration(parent_package='', top_path=None):
     return config
 
 
-CMDCLASS = {'sdist': sdist, 'build': build, 'install': install,
-            'develop': develop}
-CMDCLASS.update(versioneer.get_cmdclass())
+CMDCLASS = numpy_cmdclass
+CMDCLASS.update({'build': build, 'install': install, 'develop': develop})
+CMDCLASS = versioneer.get_cmdclass(CMDCLASS)
 
 metadata = dict(
     name='pyshtools',
Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrade to 0.19 from 0.18 - FreeCAD Forum
Uninstall 0.18 and install 0.19. If you use the so called portable version which you have just unzipped: remove the directory with all...
Read more >
A journey from Elm 0.18 to 0.19 - Medium
We used the wonderful elm-upgrade tool to have a glimpse of how much stuff would be broken after transitioning to Elm 0.19. By...
Read more >
Seems to have broken with 0.19.1 · Issue #82 - GitHub
So I installed elm 0.19.1 globally and then ran elm-upgrade. It said this a lot and failed to update the dependencies: ELM VERSION...
Read more >
A journey from Elm 0.18 to 0.19 - Reddit
The package system was redesigned, effectively making it impossible to install packages from other sources than the official repository. You can ...
Read more >
Elm 0.19 Broke Us - DEV Community ‍ ‍
But those are not what this post is primarily about (edit: and Elm provides an upgrade tool to autofix many of these things)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found