[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

question how to handle missing files, pulling in external files for documentation



Hi,

I have been working on an updated package for Keras and aimed to do
the following: (1) update to the latest version, (2) add a
documentation package.  Some issues came up that I wanted to ask
before pushing a new upstream branch.

Another thread mentioned that PyPI is preferred as the upstream source
as per the Debian Python Policy, so I changed it to that for the new
version.  However, I then discovered that the documentation would not
build with this version.  There were 3 issues:

1. The doc build script refers to CONTRIBUTING.md which is in the
github repository but not present in the PyPI download.  I could solve
this with adding "touch contributing.md" to rules, by patching the doc
build script to remove the reference to that file, or to pull in that
file from github and add it to the repository.

2. The doc build script is a Python 3 script that open()s the .md
files and write()s them elsewhere.  As the files contain unicode, this
gave encoding-related errors in cowbuilder, but not in my work
environment.  I found that in cowbuilder, python3 -c "import sys;
print(sys.getfilesystemencoding())" prints "utf-8" in my system, and
prints "ascii" in cowbuilder.  I could not find a solution by changing
locale environment variables, so finally I had to patch the script to
add "encoding=" to each call to open() and write().

3. Finally, I get lintian errors regarding privacy breach because
there are two links in the produced HTML to images hosted on the
internet.  I found I could pull these into the repository and patch
the md source, is this an acceptable solution?  (They are not logos or
anything, the images are diagrams, part of the documentation.)

Mainly my question is that I am not sure if changing the upstream
source is a good idea since there is a required file missing, should I
leave it with github and send an upstream PR to fix the build script
for PyPI for the next release?

As for 2 and 3, I would like to know if my solutions are
acceptable/worthwhile, as they require a bit of patching and including
files external to the upstream tarball. I don't know if this is a
normal thing for packages to do.

I would like to know also if this issue with Python 3 using the wrong
filesystem encoding in cowbuilder is a common problem.

kind regards,
Steve


Reply to: