From 5ce2987f3a5d0fd019048b50aac8c6b93a7025c1 Mon Sep 17 00:00:00 2001 From: Yoan Tournade Date: Tue, 10 May 2022 11:14:40 +0200 Subject: [PATCH] Fix setup.py rec include --- CHANGELOG.md | 6 +++++- setup.py | 14 +++++++++++++- tqwgp_parser/files/__init__.py | 0 3 files changed, 18 insertions(+), 2 deletions(-) delete mode 100644 tqwgp_parser/files/__init__.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 86db7d7..8300362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ +# 0.4.3 + +* Fix `setup.py` to include `tqwgp_parser.files` module files + # 0.4.2 -* Missing `__init__.py` for module `tqwgp_parser.files` +* Missing `__init__.py` for module `tqwgp_parser.files` (wrong fix) # 0.4.1 diff --git a/setup.py b/setup.py index a99d426..34fa73f 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,26 @@ import sys import re +import os import ast from setuptools import setup +# Pass package modules files. +# From https://stackoverflow.com/a/36693250/1956471 +def package_files(directory): + paths = [] + for (path, directories, filenames) in os.walk(directory): + for filename in filenames: + paths.append(os.path.join("..", path, filename)) + return paths + + readme_markdown = None with open("README.md") as f: readme_markdown = f.read() setup( name="tqwgp-parser", - version="0.4.2", + version="0.4.3", url="https://github.com/YtoTech/talk-quote-work-getpaid-parser", license="AGPL-3.0", author="Yoan Tournade", @@ -24,6 +35,7 @@ include_package_data=True, package_data={ "tqwgp_parser": ["*.hy"], + "tqwgp_parser": package_files("tqwgp_parser"), }, zip_safe=False, platforms="any", diff --git a/tqwgp_parser/files/__init__.py b/tqwgp_parser/files/__init__.py deleted file mode 100644 index e69de29..0000000