pypa / pypa/setuptools

inconsistent user of install prefix

Open
#2,263 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2.9k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
1

Description

I'm working on Ubuntu 18.04, using the system Python version 3.6.9, trying to install my own Python project.

Running python3 setup.py install --prefix=/usr/local will result in modules being installed into /usr/local/lib/python3.6/dist-packages/. However, when I want to switch to "developer mode", i.e. I replace the "install" command by "develop" (python3 setup.py develop --prefix=/usr/local), setuptools attempt to install the package into /usr/local/lib/python3.6/site-packages instead. (notice the difference between dist-packages and site-packages in the path).

Where does this inconsistency stem from, and how can I force the path to be consistent ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the two commands in setup.py: install and develop, using Python 3.6.9 on Ubuntu 18.04 with --prefix=/usr/local. Trace how each command selects dist-packages versus site-packages, then document or test a consistent path-selection behavior and verify both installation modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.