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.

Need to remove easy_install usage from doc/Makefile

See original GitHub issue

There’s still an easy_install usage in that Makefile, which gets invoked via make dist. That is going to break in the near future; easy_install was removed from setuptools three days ago.

Here’s a stab at a fix, not quite right though because we shouldn’t be invoking pip - it is much smarter now so when you point it at a wheel to install and that wheel provides numpy, that messes with the list of packages it knows it already has installed. Maybe we should just manually unzip the wheel instead.

diff --git a/doc/Makefile b/doc/Makefile
index 68d496389e..11c4145c95 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -65,12 +65,7 @@ gitwash-update:
 #------------------------------------------------------------------------------
 
 # Build the current numpy version, and extract docs from it.
-# We have to be careful of some issues:
-#
-# - Everything must be done using the same Python version
-# - We must use eggs (otherwise they might override PYTHONPATH on import).
-# - Different versions of easy_install install to different directories (!)
-#
+# Note: be careful here to use the same Python version
 
 
 INSTALL_DIR = $(CURDIR)/build/inst-dist
@@ -116,10 +111,11 @@ real-dist: dist-build html-build
        find build/dist -type d -print0 | xargs -0r chmod g+s
 
 dist-build:
-       rm -f ../dist/*.egg
-       cd .. && $(PYTHON) setup.py bdist_egg
+       rm -f ../dist/*.whl
+       cd .. && $(PYTHON) setup.py bdist_wheel
        install -d $(subst :, ,$(INSTALL_PPH))
-       $(PYTHON) `which easy_install` --prefix=$(INSTALL_DIR) ../dist/*.egg
+       # FIXME: cannot use pip, because it will mess with the already-install numpy version even if given a prefix
+       $(PYTHON) -m pip install --no-warn-conflicts --prefix=$(INSTALL_DIR) ../dist/*.whl

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
bsipoczcommented, Nov 16, 2022

https://github.com/numpy/numpy/pull/21849 took care of this, so I’m closing.

1reaction
rgommerscommented, May 4, 2022

Updated to 1.24.0; it only affects doc builds so it can always be worked around if it breaks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I remove packages installed with Python's easy_install?
For your removal needs use: pip uninstall <package>. (install using easy_install pip ). For your 'list installed packages' needs either use:
Read more >
Clean out packages installed with easy_install
To avoid these, we suggest you remove any packages you previously installed with easy_install. First you need to find the packages installed with...
Read more >
Doc/Makefile at master · Respect/Doc - GitHub
# Foundation puts its files into .foundation inside your project folder. # You can delete .foundation anytime and then run make foundation again...
Read more >
How do I remove packages installed with Python's easy_install?
If you are using MacOs then you can use the following command to uninstall the packages without installing pip. sudo easy_install -m. sudo...
Read more >
Easy Install - setuptools 65.6.3.post20221220 documentation
For basic use of easy_install , you need only supply the filename or URL of a ... If you want to delete the...
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