Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new build tools #854

Open
koenedaele opened this issue Nov 8, 2023 · 5 comments
Open

Introduce new build tools #854

koenedaele opened this issue Nov 8, 2023 · 5 comments
Assignees
Milestone

Comments

@koenedaele
Copy link
Member

We're still using setup.py while there are better options around.

@Wim-De-Clercq
Copy link
Contributor

Take care of #711 when rewriting the hook.

The npm list command returns 1 when no match is found.
subprocess.check_output has an automatic check=True internally, requiring the status to be 0.

We can use

libs = subprocess.run(["npm", "list", "-g", "grunt-cli"], stdout=subprocess.PIPE).stdout.decode()

@Wim-De-Clercq
Copy link
Contributor

Wim-De-Clercq commented Nov 24, 2023

Babel

There's a tight integration between babel and setuptools which only just got updated on their master branch. commit

Currently we can hide all the required options for pybabel in the setup.cfg file. There is no proper alternative in babel.
As see in the mkdocs project they replaced it by simply typing the full commands including all args.

There is a long standing open issue to support pyproject.toml in the babel project. This won't happen soon I guess.

I'm not exactly sure on what the steps are to build the wheels/sources for this project?
We could probably write a build hook to automatically execute pybabel compile/extract/init/update actions before building the sources/wheel so they're always up-to-date and part of the distribution files.

Is there a value to automatically run extract, update, compile? Or any 1 of these?

@koenedaele
Copy link
Member Author

I have very little knowledge of Babel, so I'm open to suggestion that make sense. Are we better off keeping the current setup around until Babel catches up?

@Wim-De-Clercq
Copy link
Contributor

Wim-De-Clercq commented Nov 24, 2023

We don't have to. And even with my linked master commit not much would change (there would be no more setuptools dependency). My main complaint is that they don't provide an alternative to their setup.cfg integration. Usually projects would support a variety of pyproject.toml config, a babel.cfg file, environment variables, CLI args. Babel only supports setup.cfg and CLI args. Which I find a bit "meh".

But in general some commands that we may have been used to are a little longer because setup.cfg is not automatically read and there is no provided alternative.

old:
    $ python setup.py compile_catalog
new:
    $ pybabel compile --directory 'atramhasis/locale' --domain atramhasis --statistics true

(I'm updating it in docs/source/development.rst)

@cedrikv cedrikv modified the milestones: Sprint 221, Sprint 222 Dec 4, 2023
@cedrikv cedrikv modified the milestones: Sprint 222, Sprint 223 Dec 18, 2023
@claeyswo claeyswo modified the milestones: Sprint 223, Sprint 224 Jan 3, 2024
@cedrikv cedrikv modified the milestones: Sprint 224, Sprint 225 Jan 15, 2024
@Wim-De-Clercq
Copy link
Contributor

Wim-De-Clercq commented Jan 24, 2024

Right now the atramhasis package does not include font-awesome fonts due to manifest.in restrictions.
We have to make sure we these are added: *.ttf *.svg *.woff *.woff2 *.eot

@cedrikv cedrikv modified the milestones: Sprint 225, Sprint 226 Jan 29, 2024
@cedrikv cedrikv modified the milestones: Sprint 226, Sprint 227 Feb 12, 2024
@cedrikv cedrikv modified the milestones: Sprint 227, Sprint 228 Feb 26, 2024
Wim-De-Clercq added a commit that referenced this issue Mar 8, 2024
Wim-De-Clercq added a commit that referenced this issue Mar 8, 2024
Wim-De-Clercq added a commit that referenced this issue Mar 8, 2024
@cedrikv cedrikv modified the milestones: Sprint 229, Sprint 230 Mar 25, 2024
@cedrikv cedrikv modified the milestones: Sprint 230, Sprint 231 Apr 8, 2024
@cedrikv cedrikv modified the milestones: Sprint 231, Sprint 232 Apr 22, 2024
@cedrikv cedrikv modified the milestones: Sprint 232, Sprint 233 May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants