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

Python XRootD 4.12.3 fails to uninstall #1284

Closed
ntarocco opened this issue Sep 17, 2020 · 12 comments
Closed

Python XRootD 4.12.3 fails to uninstall #1284

ntarocco opened this issue Sep 17, 2020 · 12 comments
Assignees

Comments

@ntarocco
Copy link

ntarocco commented Sep 17, 2020

  1. Cannot uninstall version 4.12.3. Probably due to the error with the version? See below
Building wheels for collected packages: xrootd
  Building wheel for xrootd (setup.py): started
  Building wheel for xrootd (setup.py): finished with status 'done'
  WARNING: Legacy build of wheel for 'xrootd' created no files.
  Command arguments: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5x8k274u/xrootd/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5x8k274u/xrootd/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-wrkssx3f
  Command output: [use --verbose to show]
  Running setup.py clean for xrootd
Failed to build xrootd
Installing collected packages: xrootd, isort, atomicwrites, pytest, xrootdpyfs
  Attempting uninstall: xrootd
    Found existing installation: xrootd v-
ERROR: Cannot uninstall 'xrootd'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
  1. The reported version is wrong: Found existing installation: xrootd v-
$ workon test-4.12.2
$ pip freeze | grep -i xrootd
xrootd==4.12.2
$ workon test-4.12.3
$ pip freeze | grep -i xrootd
xrootd===v-

How to reproduce

Create a Dockerfile

FROM cern/cc7-base

RUN yum install -y python3-pip
RUN pip3 install --upgrade pip
RUN pip3 install setuptools wheel --upgrade
RUN yum install -y cmake make gcc-c++ zlib-devel openssl-devel python3-devel libuuid-devel
RUN pip3 install xrootd==4.12.3
RUN pip3 uninstall -y xrootd
@adriansev
Copy link
Contributor

so, at this moment any xrootd installation is no longer possible to be un-installed

@ntarocco
Copy link
Author

It looks like that there is another small issue, the version 4.12.3 is not reporting the version correctly. See:

$ workon test-4.12.2
$ pip freeze | grep -i xrootd
xrootd==4.12.2
$ workon test-4.12.3
$ pip freeze | grep -i xrootd
xrootd===v-

@simonmichal
Copy link
Contributor

@adriansev : is this a regression in 4.14.x?

@ntarocco ntarocco changed the title Python XRootD 4.12.x fails to install Python XRootD 4.12.3 fails to uninstall Sep 18, 2020
@ntarocco
Copy link
Author

I have update the issue with the latest findings. Thanks a lot!

@adriansev
Copy link
Contributor

@simonmichal so this is only about pip (20.1.1 currently) installing (which initially i was not interested on but since recently my tool became available on pypi i became interested, as it has xrootd in requirements). the following tests are done on lxplus:
4.11.2, 4.11.3, 4.12.0, 4.12.2 : cannot uninstall, unknown version
4.12.3, 4.12.4 : cannot uninstall, version is v-
5.0.0, 5.0.1 : show version, cannot uninstall

4.12.3 was the first version with

WARNING: Requested xrootd==4.12.3 from https://files.pythonhosted.org/packages/8c/ac/71d16b5bb489685823ff62f20b0d66f12f78420a7626562f44adc1e24ac9/xrootd-4.12.3.tar.gz#sha256=ad015c42caff4720b5d1d3a7a789d4f183c1eec123243a7699ea2c1a8c0e12d1, but installing version 0.0.0

@simonmichal
Copy link
Contributor

@ntarocco & @adriansev : I just pushed a patch that converts the egg-info to dist-info which should enable the uninstall functionality, could you give it a try?

@ntarocco ntarocco reopened this Sep 24, 2020
@ntarocco
Copy link
Author

ntarocco commented Sep 24, 2020

Sure, did you push to Pypi? Which version? Or a commit in the repo?

@adriansev
Copy link
Contributor

@simonmichal I can confirm that it works:

pip3 uninstall xrootd
Found existing installation: xrootd v20200924-bb58fd65a
Uninstalling xrootd-v20200924-bb58fd65a:
  Would remove:
    /home/adrian/.local/lib/python3.7/site-packages/XRootD/*
    /home/adrian/.local/lib/python3.7/site-packages/pyxrootd/*
    /home/adrian/.local/lib/python3.7/site-packages/xrootd-v20200924_bb58fd65a-py3.7.dist-info/*
Proceed (y/n)? y
  Successfully uninstalled xrootd-v20200924-bb58fd65a

I will let the issuer to test and and close the issue.
Thanks a lot!! (thanks also to issuer for bringing up the problem :) )

@simonmichal
Copy link
Contributor

@ntarocco : you will need to build the wheel from sources and then install, just you master (to build the wheel you can use our script from CI https://github.com/xrootd/xrootd/blob/master/.gitlab-ci.yml#L427-L431)

@simonmichal
Copy link
Contributor

@ntarocco : can we close this one?

@simonmichal simonmichal self-assigned this Oct 7, 2020
@ntarocco
Copy link
Author

ntarocco commented Oct 7, 2020

Not easy for me to test at this moment :( Please go ahead, I see that @adriansev tested it, perfect! Thanks a lot!

@ntarocco
Copy link
Author

ntarocco commented Oct 7, 2020

Confirmed that it works :)

Found existing installation: xrootd 20200924
    Uninstalling xrootd-20200924:
      Successfully uninstalled xrootd-20200924

Thanks a lot!

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