Skip to content

Commit

Permalink
add BDInfo as package data
Browse files Browse the repository at this point in the history
  • Loading branch information
LeiShi1313 committed Dec 2, 2021
1 parent 1f0c606 commit f6dd178
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include pyproject.toml
exclude usage.gif
exclude usage.gif
include differential/tools/**/*
2 changes: 1 addition & 1 deletion differential/plugins/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def _get_bdinfo(self) -> str:
f'''"{os.path.join(os.path.dirname(tools.__file__), 'BDinfoCli.0.7.3/BDInfo.exe')}" -w '''
f'"{f.parent}" {temp_dir}',
abort=True)
for info in tempfile.glob("*.txt"):
for info in Path(temp_dir).glob("*.txt"):
with info.open('r') as f:
content = f.read()
if self.use_short_bdinfo:
Expand Down
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/usr/bin/env python
from glob import glob
from setuptools import setup, find_packages

setup(
name="Differential",
packages=find_packages(),
include_package_data=True,
package_data={
'differential': glob('tools/**/*')
},
long_description=open("README.md", "r", encoding='utf-8').read(),
long_description_content_type="text/markdown",
description="a Python script for easy uploading torrents to varies PT sites.",
Expand Down

0 comments on commit f6dd178

Please sign in to comment.