TheLastProject / PyEssent

A wrapper around Essent's API
Apache License 2.0
4 stars 4 forks source link

Can't compile: Pypi SDSIT archive is missing 'requirements.txt' #9

Closed onkelbeh closed 3 years ago

onkelbeh commented 3 years ago

This leads to build failure:

>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.56, 0.81, 0.80
 * Package:    dev-python/PyEssent-0.14
 * Repository: HomeAssistantRepository
 * Maintainer: b@edevau.net
 * Upstream:   sylvia@hackerchick.me
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_8 test userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking PyEssent-0.14.tar.gz to /var/tmp/portage/dev-python/PyEssent-0.14/work
>>> Source unpacked in /var/tmp/portage/dev-python/PyEssent-0.14/work
>>> Preparing source in /var/tmp/portage/dev-python/PyEssent-0.14/work/PyEssent-0.14 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-python/PyEssent-0.14/work/PyEssent-0.14 ...
>>> Source configured.
>>> Compiling source in /var/tmp/portage/dev-python/PyEssent-0.14/work/PyEssent-0.14 ...
 * python3_8: running distutils-r1_run_phase distutils-r1_python_compile
python3.8 setup.py build -j 10
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    with open(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'requirements.txt')) as requirements_file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/tmp/portage/dev-python/PyEssent-0.14/work/PyEssent-0.14/requirements.txt'
 * ERROR: dev-python/PyEssent-0.14::HomeAssistantRepository failed (compile phase):
 *   (no error message)
TheLastProject commented 3 years ago

I'm not seeing any difference with the older versions. I guess the source archive has just always been broken and HomeAssistant just always downloaded the wheel and you're the first person to actually try to compile from source?

I wonder what I'm doing wrong here to make the requirements.txt file not end up being included in the Pypi. It doesn't seem to affect Pext despite me not doing anything special to include requirements.txt there either...

onkelbeh commented 3 years ago

I am not using your component in my own setup, I just added it for completeness of the Gentoo Home Assistant Repository. I don't even know if anyone uses it from this Repo.

And yes, can confirm it is broken since at least 0.10.

Mising files in Pypi's SDIST archive is a common mistake, I found about 60 packages with 'broken' aka incomplete SDIST archives (~0.5% of the packges). Usually I then use a tagged release archive from Github for the Ebuild, but at Github, you do not tag releases. I was too lazy to pick out the corresponding commit Ids, so I just added a patch in the build script some time ago. I do a walk through all patches on a regular schedule, if a problem persists for longer, I try to fix the problem at the origin, or, like in this case, I notify the code owner.

A proper fix would add the file to the archive. I cannot fix it for you, you do not have your build scripts on Github.

TheLastProject commented 3 years ago

I just run python3 setup.py sdist bdist_wheel, so that is the whole "build script"

onkelbeh commented 3 years ago

Hmmm, I am no expert at setuptools, but a simple include_package_data=True, should do the job if you have an include for it in MANIFEST.in.

please see setuptools manual, scroll down to "Including Data Files"

onkelbeh commented 3 years ago

just found one, as an example, this guy also has no workflow for autodeployment: https://github.com/jeroenterheerdt/pycsspeechtts/commit/6267febc6ac3998438cd43373535f842c14e9fe5

TheLastProject commented 3 years ago

Ah, so THAT was the difference between this and my other project that didn't have this issue! The MANIFEST.in!

TheLastProject commented 3 years ago

Fixed in 4ef264a30137ba3c4e4548679336d30f086b1c3a, thanks!

onkelbeh commented 3 years ago

Thank you very much, too. Have a nice weekend. Hope you don't mind I use your component for the Repo.

TheLastProject commented 3 years ago

Nah, I think it's quite cool you're managing a Gentoo Repo for these things. While for me PyPI is fine enough, I understand why people prefer their distro's package manager and I'm glad some people actually make that possible :)