Skip to content

Commit

Permalink
includes gettext portable and machine objects in Python package
Browse files Browse the repository at this point in the history
After #1348, setuptools is not responsible for compiling the portable to
machine objects, only for including both as produced by Weblate.
  • Loading branch information
cfm committed Dec 7, 2021
1 parent 2b6991e commit e656d48
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ common-steps:
run:
name: Tag and make source tarball
command: |
cd ~/packaging/securedrop-debian-packaging
. .venv/bin/activate
cd ~/project
./update_version.sh 1000.0 # Dummy version number, doesn't matter what we put here
python3 setup.py sdist
Expand Down
20 changes: 0 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import os
import subprocess

import setuptools
from setuptools.command.sdist import sdist

with open("README.md", "r") as fh:
long_description = fh.read()
Expand All @@ -14,20 +12,6 @@
for name in os.listdir("./securedrop_client/resources/images/"):
package_resources.append(os.path.join("./securedrop_client/resources/images", name))


class SdistWithTranslationCatalogs(sdist):
def run(self):
"""Call out to `make compile-translation-catalogs`, then run the rest of
the rest of the normal `sdist` routine.
"""

cmd = ["make", "compile-translation-catalogs"]
if subprocess.call(cmd) != 0:
raise EnvironmentError(f"error calling {cmd}")

super().run()


setuptools.setup(
name="securedrop-client",
version="0.5.1",
Expand All @@ -51,9 +35,5 @@ def run(self):
"Operating System :: OS Independent",
],
entry_points={"console_scripts": ["sd-client = securedrop_client.app:run"]},
# Override "sdist" to compile gettext gettext POs to MOs for inclusion in
# built distributions.
cmdclass={"sdist": SdistWithTranslationCatalogs},
package_data={"": ["locale/*/*/*.mo", "locale/*/*/*.po"]},
setup_requires=["babel"],
)

0 comments on commit e656d48

Please sign in to comment.