-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Support package_data-like of non-Python resource files in Python packages #22655
Comments
This comment has been minimized.
This comment has been minimized.
comment:1
Hopefully this makes sense. Let me know if there's any more I can clarify. Note that, unlike my original attempt at this in #21732, I avoided moving |
comment:3
First of all, there is an easy conflict with #22662. The function It makes sense to generalise this, but then it should no longer handle |
comment:4
I think it's a bit silly to duplicate
See also #21682 comment:34 |
comment:5
There is also an easy conflict with #22106. |
comment:6
Only if you run |
comment:7
Replying to @embray:
What do you mean? If I run |
comment:8
|
comment:9
Replying to @embray:
For what value of "work"? Do you mean "work" as in: doesn't raise an exception? Or "work" as in: actually does something meaningful? It makes little sense to run just Splitting the installation of data files in two, just because it adheres to some theoretical principle that nobody cares about, looks like a bad idea to me. |
comment:10
Together with #21682, I would like to move to the following build steps:
Erik, what's your opinion on this? |
comment:11
I do that almost every day on 'normal' projects. In any case, by overthinking it you're actually making it more complicated and less reliable. It works fine as is. |
comment:12
Replying to @embray:
...at the cost of extra complexity. I am a strong believer in the https://en.wikipedia.org/wiki/KISS_principle |
comment:13
You don't need to link me to a Wikipedia article on "KISS". In fact complexity is sometimes subjective. You're upset because you see what looks like a little bit of code duplication (actually, I don't see it as duplication; it's doing two somewhat different things that nonetheless look similar due to using the same API), but without it in fact you're relying on a fragile, poorly documented/specified state machine to do things in the right order or else everything breaks. That to me is complexity. |
comment:14
(I do agree about rebasing on / integrating with #21682 except that's been stalled for months for no apparent reason) |
comment:15
Alright, I rebased #21682, so I'll at least see about integrating this ticket with it properly. If there's any opportunity I can find to reduce code duplication I'll take it, but I do think in this case files generated from Cython should be handled separately from static files. |
comment:16
does not apply |
comment:17
Erik: I'm confused how you see the bigger picture with this ticket and #21682. In your ideal world, how would the build process work? In other words: what is your alternative to [comment:10]? |
comment:18
TODO: discuss next week if possible. |
comment:19
Replying to @jdemeyer:
I think this makes sense, actually. The only thing is that |
comment:20
Let's get this ticket done to support #28752 |
comment:21
Yeah, I need to revisit this. I don't remember why I was so protective of my original approach, except that I do recall there being a good reason. I just don't know what it was anymore. I know one reason had to do with ensuring that |
comment:22
Ticket retargeted after milestone closed |
This enhances
sage_setup.find.find_extra_files
to better support non-Python resources found in Python package sources. Previously it could include extra files found underbuild/cythonized
, but now it can also include arbitrary files (including support forfnmatch
patterns) that should be installed alongside a Python package. For example,will find any
.html
files under the./sage/foo/
package.This will be useful for #21732 and possibly other tickets.
This also adds a
package_data
variable inmodule_list.py
that can list all non-Python resources on a per-package basis (using the same format as the standardpackage_data
option to setup.py. This includes handling of package data in a way that's compatible withsage_setup.clean.clean_install_dir
.CC: @mkoeppe
Component: build
Author: Erik Bray
Branch/Commit: u/embray/build/package-data @
5d30652
Issue created by migration from https://trac.sagemath.org/ticket/22655
The text was updated successfully, but these errors were encountered: