aws / aws/base64io-python

Permissions error during pip install on MacOS/Homebrew Python3

Offen
#38 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
pending release
Vorherrschende Sprache
Python
Sterne
42
Forks
29
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi,

I ran into a permissions error during `pip3 install` as your `setup.py` seems to want to copy data files to `/usr/local` on my machine, i.e.

```
$ pip3 install base64io
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting base64io
Using cached base64io-1.0.3-py2.py3-none-any.whl (17 kB)
Installing collected packages: base64io
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/CHANGELOG.rst'
Consider using the `--user` option or check the permissions.
```

As it happens, the installation does still succeed, despite the error message indicating otherwise.

I realise I can simply perform a `--user` install and work around this issue, but I don't think that should be necessary. I'm using Homebrew installed Python 3.9.5 on MacOS, both pip3 and python3 are in `/usr/local/bin`.

I think this can be solved by replacing
```
data_files=["README.rst", "CHANGELOG.rst", "LICENSE"],
```
with
```
include_package_data=True,
```
in `setup.py` as the files are already listed for inclusion in `MANIFEST.in`.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der Inspektion von setup.py und MANIFEST.in und reproduziere anschließend die Homebrew Python 3 pip3-Installation unter macOS. Erledigt ist die Aufgabe, wenn die Paketinstallation nicht mehr versucht, README.rst, CHANGELOG.rst oder LICENSE nach /usr/local zu kopieren, und ohne den Berechtigungsfehler abgeschlossen wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Klar beschrieben
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.