GithubHelp home page GithubHelp logo

Comments (6)

lxp avatar lxp commented on August 28, 2024 1

I analysed it again, you where right with your guess that there is a link in Ubuntu. Thanks for your patience :)
At first I just looked for /usr/man, but Ubuntu defaults to installing pip packages to /usr/local, so the link was located there:

lrwxrwxrwx 1 root root 9 Nov  1 21:15 /usr/local/man -> share/man

Just for the fun, ArchLinux has this link in the opposite direction:

lrwxrwxrwx 1 root root 6 Oct 18 21:01 /usr/local/share/man -> ../man

However, ArchLinux defaults to installing pip packages to /usr.
/usr/man does not exist on both distros.

I think you are right that we should just stick to the newer standard of installing to share/man/man1 instead of man/man1.

from cfv.

lxp avatar lxp commented on August 28, 2024

Could this be an Arch Linux specific issue?

When I run pip install cfv on a fresh Ubuntu 22.04 the man page is installed to /usr/local/share/man/man1/cfv.1, which seems fine to me.

from cfv.

vestingz avatar vestingz commented on August 28, 2024

I am not quite familiar with the installation process in python. Could it be possible that Ubuntu generally symlinks /usr/man/man1 to /usr/local/share/man/man1?

from cfv.

lxp avatar lxp commented on August 28, 2024

I don't think so, /usr/man does not exist at all on Ubuntu 22.04.
This is what I tried:

$ docker run --rm -it ubuntu:22.04
root@09191a7797be:/# apt update
[...]
root@09191a7797be:/# apt install python3-pip
[...]
root@09191a7797be:/# pip install cfv
Collecting cfv
  Downloading cfv-3.0.0-py3-none-any.whl (49 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.1/49.1 KB 1.3 MB/s eta 0:00:00
Installing collected packages: cfv
Successfully installed cfv-3.0.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
root@09191a7797be:/# ls -lah /usr/man 
ls: cannot access '/usr/man': No such file or directory
root@09191a7797be:/# ls -lah /usr/local/share/man/man1/cfv.1 
-rw-r--r-- 1 root root 13K Nov 10 22:57 /usr/local/share/man/man1/cfv.1
root@09191a7797be:/# namei -l /usr/local/share/man/man1/cfv.1 
f: /usr/local/share/man/man1/cfv.1
drwxr-xr-x root root /
drwxr-xr-x root root usr
drwxr-xr-x root root local
drwxr-xr-x root root share
drwxr-xr-x root root man
drwxr-xr-x root root man1
-rw-r--r-- root root cfv.1

I think the final install location is chosen by pip in this case. I am not sure how your installation works and what system/versions you use. Maybe you can provide a similar reproducer.

from cfv.

vestingz avatar vestingz commented on August 28, 2024

The final installation location is actually determined by the data_files directive in setup.py. So I guess it would suffice to change that from man/man1 to share/man?

/usr should be omitted according to the documentation.

from cfv.

vestingz avatar vestingz commented on August 28, 2024

I analysed it again, you where right with your guess that there is a link in Ubuntu. Thanks for your patience :)

No problem, I was also only randomly poking around 😄

Thanks for the fix!

from cfv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.