Browse Source

Move non-library package data outside of Python package

This avoids having the files themselves installed as Python files used
by the package. As these files are not used by the actual Python code,
no need to install alongside the library. All files remain a part of the
source package, are just not installed.

The license file is now installed using the wheel package's supported
method. Added to [metadata] to setup.cfg with the property license-file,
with this, the license is now installed in to the dist-info directory.
pull/72/head
Jon Dufresne 5 years ago
parent
commit
6c9fda538a
  1. 0
      CONTRIBUTORS.txt
  2. 0
      LICENSE.txt
  3. 3
      MANIFEST.in
  4. 0
      README.html
  5. 0
      README.rst
  6. 3
      setup.cfg
  7. 20
      setup.py

0
olefile/CONTRIBUTORS.txt → CONTRIBUTORS.txt

0
olefile/LICENSE.txt → LICENSE.txt

3
MANIFEST.in

@ -1,6 +1,9 @@
include CONTRIBUTORS.txt
include install.bat
include LICENSE.txt
include README.html
include README.md
include README.rst
include setup.py
graft doc

0
olefile/README.html → README.html

0
olefile/README.rst → README.rst

3
setup.cfg

@ -1,2 +1,5 @@
[bdist_wheel]
universal = 1
[metadata]
license_file = LICENSE.txt

20
setup.py

@ -26,7 +26,7 @@ name = "olefile"
version = __version__
desc = "Python package to parse, read and write Microsoft OLE2 files (Structured Storage or Compound Document, Microsoft Office) - Improved version of the OleFileIO module from PIL, the Python Image Library."
# read long description from disk in restructuredtext format:
long_desc = open('olefile/README.rst').read()
long_desc = open('README.rst').read()
author = __author__
author_email = "https://www.decalage.info/contact"
url = "https://www.decalage.info/python/olefileio"
@ -121,23 +121,6 @@ def rglob(top, prefix='', pattern='*'):
return list(riglob(top, prefix, pattern))
package_data={
'olefile': [
'README.rst',
'README.html',
'LICENSE.txt',
'CONTRIBUTORS.txt',
# 'olefile.html',
]
# doc folder: md, html, png
# + rglob('olefile/doc', 'doc', '*.html')
# + rglob('olefile/doc', 'doc', '*.md')
# + rglob('olefile/doc', 'doc', '*.png'),
}
#--- data files ---------------------------------------------------------------
# not used for now.
@ -237,7 +220,6 @@ def main():
license=license,
## package_dir=package_dir,
packages=packages,
package_data = package_data,
download_url=download_url,
# data_files=data_files,
# scripts=scripts,

Loading…
Cancel
Save