Closed wroyca closed 1 year ago
This is a good point. Though, since I first set poxy up I have soured on submodules somewhat (because of shit like this) - I think a more robust solution ultimately is to just vendor m.css directly
This is a good point. Though, since I first set poxy up I have soured on submodules somewhat (because of shit like this) - I think a more robust solution ultimately is to just vendor m.css directly
One solution would be to replace the submodule with a subtree; I think this would work well in this case since we just want to "vendor" m.css
Something like:
git subtree add --prefix poxy/data https://github.com/mosra/m.css.git main --squash
Oh hey, that's a good alternative! TIL about git subtrees
Oh @wroyca I've just realized that for people who install poxy the conventional way (i.e. as a non-editable install), the submodule thing isn't a factor; setup.py
bundles the local m.css submodule into the python package in that scenario so git never even enters into the equation.
Having said that, it's still annoying for developing and iterating, so I'll replace the submodule all the same, methinks.
Oh @wroyca I've just realized that for people who install poxy the conventional way (i.e. as a non-editable install), the submodule thing isn't a factor;
setup.py
bundles the local m.css submodule into the python package in that scenario so git never even enters into the equation.Having said that, it's still annoying for developing and iterating, so I'll replace the submodule all the same, methinks.
Do you want me to replace it with a subtree? I'm comfortable with them, although it's only one command, so that shouldn't be a problem
Nah it's alright, I'm currently working on a much more kill-a-fly-with-a-sledgehammer solution :)
So the solution I went with was to add another 'hidden' developer command --update_mcss <path>
, the idea being that instead of the copying and file fitering happening during setup.py every release, it's done as necessary when iterating on anything m.css related. I'll write up some better notes at some point soon (the elusive CONTRIBUTING.md
)
LGTM
We should consider adding
git submodule update --recursive --init
to setup.py otherwise users might get an unexpected surprise