cheshirekow / cmake_format

Source code formatter for cmake listfiles.
GNU General Public License v3.0
954 stars 105 forks source link

pypi source package fundamentally broken #234

Open Anthchirp opened 3 years ago

Anthchirp commented 3 years ago
$ pip install --no-binary :all: cmakelang
Collecting cmakelang
  Downloading cmakelang-0.6.13.tar.gz (123 kB)
     |████████████████████████████████| 123 kB 7.9 MB/s 
    ERROR: Command errored out with exit status 1:
     command: python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-stuhsbsp/cmakelang/setup.py'"'"'; __file__='"'"'/tmp/pip-install-stuhsbsp/cmakelang/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-k3so_njf
         cwd: /tmp/pip-install-stuhsbsp/cmakelang/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-stuhsbsp/cmakelang/setup.py", line 16, in <module>
        with io.open("cmakelang/doc/README.rst", encoding="utf-8") as infile:
    FileNotFoundError: [Errno 2] No such file or directory: 'cmakelang/doc/README.rst'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Basically the setup depends on files not contained in the source archive. Further, the motif to download additional files on top doesn't seem particularly helpful either, as the release will not be self-contained - any chance this could be restructured so that everything needed for the build is contained in the sdist?

Anthchirp commented 3 years ago

Questionable whether defining multiple packages in a single setup.py as done here is even allowed.

$ pip install "git+https://github.com/cheshirekow/cmake_format.git@v0.6.13"
Collecting git+https://github.com/cheshirekow/cmake_format.git@v0.6.13
  Cloning https://github.com/cheshirekow/cmake_format.git (to revision v0.6.13) to /tmp/pip-req-build-clga8wz3
ERROR: More than one .egg-info directory found in /tmp/pip-pip-egg-info-7kvwbepo
cheshirekow commented 3 years ago

Further, the motif to download additional files

I don't understand what you mean by this. It looks like there is just a file missing from the sdist. Am I missing something?

Questionable whether defining multiple packages in a single setup.py as done here is even allowed.

Why is this questionable?