Skip to content

Commit

Permalink
package_data is not recursive, list dirs manually
Browse files Browse the repository at this point in the history
There are quite a few approaches to try to make setuptools more smart things
like `include_package_data` or writing a small function which returns
the files.
But for once, lets not over-engineer it here and just list the paths
manually.

Fixes the issue of the missing template as verifiable by:

unzip -v dist/yaml4rst-0.1.1-py3-none-any.whl
```
Archive:  dist/yaml4rst-0.1.1-py3-none-any.whl
 Length   Method    Size  Cmpr    Date    Time   CRC-32   Name
--------  ------  ------- ---- ---------- ----- --------  ----
    2467  Defl:N      755  69% 2016-11-05 17:55 405770e3  yaml4rst/helpers.py
     499  Defl:N      314  37% 2016-11-05 17:55 7c0ad5d7  yaml4rst/defaults.py
   34464  Defl:N     7289  79% 2016-11-05 18:57 dc492b1c  yaml4rst/reformatter.py
     233  Defl:N      150  36% 2016-11-05 17:55 b126375d  yaml4rst/__init__.py
     957  Defl:N      545  43% 2016-11-05 19:04 dab9ef7a  yaml4rst/_meta.py
    4758  Defl:N     1601  66% 2016-11-18 00:03 bf1b38d7  yaml4rst/cli.py
     266  Defl:N      176  34% 2016-11-05 17:55 9f7fe2b5  yaml4rst/templates/debops/ansible/defaults_header.j2
    4580  Defl:N     1826  60% 2016-11-18 20:53 244ff541  yaml4rst-0.1.1.dist-info/DESCRIPTION.rst
      48  Defl:N       43  10% 2016-11-18 20:53 04447e33  yaml4rst-0.1.1.dist-info/entry_points.txt
    1516  Defl:N      725  52% 2016-11-18 20:53 85946fec  yaml4rst-0.1.1.dist-info/metadata.json
       9  Defl:N       11 -22% 2016-11-18 20:53 5bb9d6b5  yaml4rst-0.1.1.dist-info/top_level.txt
      92  Defl:N       92   0% 2016-11-18 20:53 4311f75b  yaml4rst-0.1.1.dist-info/WHEEL
    6041  Defl:N     2265  63% 2016-11-18 20:53 315b7eb5  yaml4rst-0.1.1.dist-info/METADATA
    1165  Defl:N      707  39% 2016-11-18 20:53 9df2d361  yaml4rst-0.1.1.dist-info/RECORD
--------          -------  ---                            -------
   57095            16499  71%                            14 files
```

Related to: #1
  • Loading branch information
ypid committed Nov 18, 2016
1 parent d6aebdf commit 08a58c6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@
),
keywords='YML YAML RST reStructuresText Ansible DebOps linting docs documentation',
packages=find_packages(exclude=['contrib', 'docs', 'tests*']),
package_data={'yaml4rst': ['*.j2']},
package_data={
'yaml4rst': [
'templates/debops/ansible/*',
],
},
install_requires=[
# Debian packages: python-yaml python3-yaml python-jinja2 python3-jinja2
'PyYAML',
Expand Down

0 comments on commit 08a58c6

Please sign in to comment.