Replies: 1 comment
-
|
Hi @maximlt, please find below my thoughts on the matter:
My best guess is that this issue is caused by a few circumstances happening all at the same time:
That is a way of doing it 😅. Please note that newer versions of
You can do that, but I believe that the easiest solution in my opinion is to use
I created holoviz/holoviews#5634 as an example on how I would implement using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! I'm reporting what seems to be a bug but as I'm not totally sure I preferred opening a discussion.
I noticed that the holoviews package distributed its
examplesfolder twice in its sdist, one at the root and one in./holoviews/. This is what I've been trying to fix and I've been puzzled by some of the behavior I've observed.The
examplesfolder is not included in theholoviewspackage source in the Git repository, it is purely a data folder that sits next to the package. However, we distribute it within the package so that distributions include it and users can runholoviews exampleswhich is a simple command that basically copies theexamplesdirectory, from the distribution, to the local directory. Super simple way to distribute data, in this case Jupyter notebooks and some data.To include the
examplesfolder during the build, there's some code insetup.pythat copies on-the-fly the folder into the package. Thepyct.build.examplesfunction below just does that, copying./examplesto./holoviews/examples:(I'm not sure this is the correct way to achieve that, and that might well be the root cause of the issue. Should we instead register a new
Command/SubCommandand things would work as expected?)Setuptools is configured to
include_package_data:The
MANIFEST.infile is set up to graft the newly copied./holoviews/examplesfolder:It was previously set to also graft the root
./examplesfolder, which led to that folder being included twice in the sdist but also apparently led to that folder correctly being included in the wheel. The snippets I'm sharing in this post are from a branch where the only change I've made is to remove that graft, as I originally thought that was the only issue. It appears that there's more thant that and I don't yet undertand well enough the full build process to debug it properly. Happy to hear anything that would help in that direction! :) Also curious to hear whether there would be a completely different approach to distribution data folders that would be maybe more modern, as the approach used here is I believe a few years old.Here are the commands required to reproduce the issue I'm observing:
This creates an sdist and a wheel. The sdist only contains the
examples* folder once, in./holoviews/examples. However the *wheel* does not include theexamplesfolder at all :( That's **the issue**. Interestingly, running insteadpython -m build --wheel --sdistproduces the output I'm after, where theexamples` folder is included only once in both the sdist and the wheel.Here's the full log of running
python -m build:Beta Was this translation helpful? Give feedback.
All reactions