diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93cb941 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +__pycache__ +build +dist +python_patch.egg-info \ No newline at end of file diff --git a/patch.py b/patch.py index 4775d70..c0975e9 100755 --- a/patch.py +++ b/patch.py @@ -697,8 +697,8 @@ def _normalize_filenames(self): for i,p in enumerate(self.items): if debugmode: debug(" patch type = " + p.type) - debug(" source = " + p.source) - debug(" target = " + p.target) + debug(" source = " + p.source.decode()) + debug(" target = " + p.target.decode()) if p.type in (HG, GIT): # TODO: figure out how to deal with /dev/null entries debug("stripping a/ and b/ prefixes") @@ -1200,4 +1200,4 @@ def main(): # PatchSet.items --> PatchSet.patches # [ ] run --revert test for all dataset items -# [ ] run .parse() / .dump() test for dataset +# [ ] run .parse() / .dump() test for dataset \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..36771c8 --- /dev/null +++ b/setup.py @@ -0,0 +1,28 @@ +import pathlib + +from setuptools import setup, find_packages + +import patch + +setup( + name="python-patch", + version=patch.__version__, + description="Library to parse and apply unified diffs.", + long_description=(pathlib.Path(__file__).parent / "README.md").read_text(), + long_description_content_type="text/markdown", + url=patch.__url__, + author=patch.__author__, + author_email="techtonik@gmail.com", + license=patch.__license__, + entry_points={"console_scripts": ["patch.py=patch:main"]}, + # packages=find_packages(exclude=["tests", "tests.*"]), + packages = ["."], + install_requires=[ + ], + extras_require={ + # [all] pulls in all radio libraries + "testing": [ + "pytest>=5.4.5", + ], + }, +) \ No newline at end of file