mar10/wsgidav

Include 'sample_wsgidav.yaml' in PyPI package

djmattyg007 opened this issue · 6 comments

I think it would be a good idea to include the sample config file in the package uploaded to PyPI. This would make it easier to utilise, as users wouldn't need to manually download it separately.

mar10 commented

pip install would put it somewhere in a virtual environment, e.g. .../.venv/Lib/site-packages/wsgidav and Windows installer at <user>\AppData\Local\Programs\WsgiDAV, so that would not be very accessible eiter?

Maybe a new subcommand like wsgidav init, that creates that file in the local folder would be an alternative

My thinking behind this was mainly for Linux distribution packaging. It's common to include sample config files in somewhere like /usr/share/<packagename>/.

Regardless, it's still significantly better for users and packagers if this file is available as a static file that can be directly inspected and copied into place as necessary, rather than having to obtain it from somewhere else.

If you were to add an init style command, I think it would be better to make it an interactive experience to set up a config from scratch.

mar10 commented

I don't know much about linux packaging but I see that you do?

Currently the CHANGELOG.md is already added to the deployment using the data_files option: #225 .
Did this work for your purposes?

And I am not sure any more if this was a good choice, since it gets added to the root folder of the virtual env.
Would be nice to know some best practice for this.

I have no idea what that slideshow is or how old it is or anything else, but I can only assure you it's basically irrelevant. The setup.py file in this repo uses setuptools, so there is no concern. It's trivial to confirm that the changelog file does not end up in the root folder of the virtualenv. There are many reasons why people don't use distutils these days, and this is just one of many.

So yes, adding files by way of the data_files option works perfectly well 👍

So it turns out I was incorrect about using data_files. The comment about it ending up in the root of the virtualenv is still incorrect AFAICT, but you should be using a MANIFEST.in file instead.

This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs.
Thank you for your contributions.