sphinx-doc / sphinx

The Sphinx documentation generator
https://www.sphinx-doc.org/
Other
6.63k stars 2.13k forks source link

sphinxcontrib-serializinghtml [1.1.5]: pep517 based build do not package .mo files #10024

Open kloczek opened 2 years ago

kloczek commented 2 years ago

Describe the bug

I'm trying to package your module as an rpm package. So I'm using the typical pep517 based build, install and test cycle used on building packages from non-root account:

After try to do that with https://github.com/sphinx-doc/sphinxcontrib-serializinghtml/ looks like generated file are only .po files and there is no .mo files

[tkloczko@ss-desktop dist]$ unzip -l sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl
Archive:  sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
      574  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5-py3.8-nspkg.pth
     6051  12-27-2021 09:36   sphinxcontrib/serializinghtml/__init__.py
     1095  05-22-2021 16:06   sphinxcontrib/serializinghtml/jsonimpl.py
      287  05-22-2021 16:06   sphinxcontrib/serializinghtml/version.py
      940  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sphinxcontrib.serializinghtml.pot
      245  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/.tx/config
     1346  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ar/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1001  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/bg/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      999  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/bn/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      999  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ca/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1003  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/cak/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1077  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/cs/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1042  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/cy/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1209  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/da/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      998  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/de/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1342  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/el/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1001  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/eo/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1336  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/es/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1188  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/et/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      998  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/eu/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1375  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/fa/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      999  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/fi/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1298  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/fr/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1092  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/he/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1379  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/hi/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1011  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/hi_IN/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1072  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/hr/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1240  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/hu/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1190  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/id/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      999  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/it/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1274  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ja/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1220  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ko/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1133  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/lt/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1034  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/lv/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1032  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/mk/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1024  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/nb_NO/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      998  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ne/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      997  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/nl/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1260  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/pl/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1002  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/pt/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1270  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/pt_BR/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1019  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/pt_PT/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1041  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ro/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1137  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ru/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      999  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/si/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1284  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sk/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1053  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sl/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1241  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sq/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1073  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sr/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1093  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sr@latin/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1088  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sr_RS/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      999  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/sv/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      997  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ta/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      998  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/te/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1195  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/tr/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1239  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/uk_UA/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      996  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/ur/LC_MESSAGES/sphinxcontrib.serializinghtml.po
      995  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/vi/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1243  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/zh_CN/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1007  05-22-2021 16:06   sphinxcontrib/serializinghtml/locales/zh_TW/LC_MESSAGES/sphinxcontrib.serializinghtml.po
     1453  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5.dist-info/LICENSE
     1525  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5.dist-info/METADATA
      110  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5.dist-info/WHEEL
       14  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5.dist-info/namespace_packages.txt
       14  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5.dist-info/top_level.txt
     8935  12-27-2021 09:36   sphinxcontrib_serializinghtml-1.1.5.dist-info/RECORD
---------                     -------
    81378                     66 files

How to Reproduce

$ git clone https://github.com/sphinx-doc/sphinxcontrib-serializinghtml/ 
$ cd sphinxcontrib-serializinghtml
$ python3 -sBm build -w

And check content of the generated .whl file in dist/ directory

Expected behavior

pep518 based build should package not .po but .mo files.

Your project

https://github.com/sphinx-doc/sphinxcontrib-serializinghtml/

Screenshots

No response

OS

Linux/x86_64

Python version

3.8.12

Sphinx version

4.3.2

Sphinx extensions

N/A

Extra tools

build module

Additional context

No response

kloczek commented 2 years ago

Just found that from inherited from Fedora spec file before build was remove all .mo files so missing .mo files where caused by this.

Nevertheless looks like po files should not be packaged and installed.

picnixz commented 8 months ago

So, long story short: