openfisca / openfisca-web-api

[DEPRECATED] Web API for OpenFisca
https://www.openfisca.fr/
GNU Affero General Public License v3.0
13 stars 11 forks source link

mo translation file generation fails when running setup.py #86

Closed pndsagora closed 7 years ago

pndsagora commented 7 years ago

Hi,

When I try to build openfisca-web-api as wheel package, command fails with error

$ python setup.py bdist_wheel
[...]
error: can't copy 'openfisca_web_api/i18n/fr/LC_MESSAGES/openfisca-web-api.mo': doesn't exist or not a regular file

mo translation file seems to not be generated from matching po source file. As a workaround, I've commented corresponding line in setup.py

Problem also exists on modules openfisca-core and openfisca-france.

pndsagora commented 7 years ago

Sorry, I missed the _compilecatalog command from the README.

cbenz commented 7 years ago

Normally you shouldn't build the package by yourself, but instead install the published version on PyPI with:

pip install OpenFisca-Web-API

Indeed, the maintainers run compile_catalog before publishing the package, but that's not something users like you should do.

pndsagora commented 7 years ago

Perhaps I'm missing something but PyPi only seems to include some specific version :

https://pypi.python.org/pypi?%3Aaction=search&term=openfisca&submit=search

What if I want to fetch a custom version from sources ?

For example openfisca-core v4.1.5 openfisca-parsers v1.0.0 openfisca-france v10.0.0b0 openfisca-web-api v3.0.0 ?

cbenz commented 7 years ago

I'm very curious ^^

Why do you want to install a past version?

Perhaps I'm missing something but PyPi only seems to include some specific version :

Indeed, the web UI of PyPI is not very clear about past versions, but they are hosted. You can install any published version with this syntax:

pip install OpenFisca-Core==4.1.5

You can see the versions with this hidden URL: https://pypi.python.org/simple/openfisca-core/

Source: http://stackoverflow.com/a/29358070/3548266

pndsagora commented 7 years ago

Thanks a lot, I completely missed the fact that PyPi had all versions hosted.

We need to build specific version because we don't have test our application with latest openfisca changes at the moment.

I've also made a pull request to be able to build RPM packages from git sources, it will be helpful to us.