zopieux / py-gfm

Github-Flavored Markdown for Python-Markdown.
https://pypi.org/project/py-gfm/
BSD 3-Clause "New" or "Revised" License
71 stars 14 forks source link

LICENSE file install destination go outside of package #23

Closed Phuker closed 4 years ago

Phuker commented 4 years ago

When install this package, LICENSE file will be installed outside of this package, which in my opinion is not perfect.

For example, on Ubuntu 20.04 running as root, it would be installed to /usr/local/LICENSE

# python3 -m pip uninstall py-gfm
Found existing installation: py-gfm 1.0.0
Uninstalling py-gfm-1.0.0:
  Would remove:
    /usr/local/LICENSE
    /usr/local/lib/python3.8/dist-packages/gfm/*
    /usr/local/lib/python3.8/dist-packages/mdx_gfm/*
    /usr/local/lib/python3.8/dist-packages/mdx_partial_gfm/*
    /usr/local/lib/python3.8/dist-packages/py_gfm-1.0.0.dist-info/*
Proceed (y/n)? y
  Successfully uninstalled py-gfm-1.0.0

On macOS, there will be an error:

$ python3 -m pip install -U py-gfm
Looking in indexes (blah blah)
Collecting py-gfm
  Downloading 
(blah blah)
Installing collected packages: py-gfm
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/local/LICENSE'
Consider using the `--user` option or check the permissions.

I don't know much about setuptools, but it seems be caused by data_files in setup.py.

Thank you.