Skip to content

Commit fac031b

Browse files
committed
fix
1 parent 8744d39 commit fac031b

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

backtrader/__init__.py

Lines changed: 0 additions & 4 deletions
This file was deleted.

pwb_backtrader/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
from __future__ import absolute_import, division, print_function, unicode_literals
2222

2323

24-
__version__ = "1.9.78.124"
24+
__version__ = "1.9.78.125"
2525

2626
__btversion__ = tuple(int(x) for x in __version__.split("."))

setup.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
import codecs # To use a consistent encoding
2323
import setuptools
2424

25+
26+
_pkg_root = "pwb_backtrader"
27+
_internal = setuptools.find_packages(where=_pkg_root)
28+
_public = ["backtrader"] + ["backtrader." + p for p in _internal]
29+
2530
here = os.path.abspath(os.path.dirname(__file__))
2631

2732
# Get the long description from the relevant file
@@ -33,7 +38,7 @@
3338

3439
# Get the version ... execfile is only on Py2 ... use exec + compile + open
3540
vname = "version.py"
36-
with open(os.path.join(pname, vname)) as f:
41+
with open(os.path.join(pname, vname), encoding="utf-8") as f:
3742
exec(compile(f.read(), vname, "exec"))
3843

3944
# Generate links
@@ -91,22 +96,22 @@
9196
keywords=["trading", "development"],
9297
# You can just specify the packages manually here if your project is
9398
# simple. Or you can use find_packages().
94-
packages=setuptools.find_packages() + ["backtrader"],
95-
package_dir={"backtrader": "backtrader", "pwb_backtrader": "pwb_backtrader"},
99+
packages=["backtrader"] + _public, # every sub-package
100+
package_dir={"backtrader": _pkg_root},
101+
include_package_data=True, # pick up data files
102+
install_requires=["tqdm"],
103+
extras_require={"plotting": ["matplotlib"]},
104+
entry_points={"console_scripts": ["btrun=backtrader.btrun:btrun"]},
96105
# packages=['backtrader', '],
97106
# List run-time dependencies here.
98107
# These will be installed by pip when your
99108
# project is installed. For an analysis of "install_requires" vs pip's
100109
# requirements files see:
101110
# https://packaging.python.org/en/latest/requirements.html
102-
install_requires=["tqdm"],
103111
# List additional groups of dependencies here
104112
# (e.g. development dependencies).
105113
# You can install these using the following syntax, for example:
106114
# $ pip install -e .[dev,test]
107-
extras_require={
108-
"plotting": ["matplotlib"],
109-
},
110115
# If there are data files included in your packages that need to be
111116
# installed, specify them here. If using Python 2.6 or less, then these
112117
# have to be included in MANIFEST.in as well.
@@ -120,6 +125,5 @@
120125
# "scripts" keyword. Entry points provide cross-platform support and allow
121126
# pip to create the appropriate form of executable for the target platform.
122127
# entry_points={'console_scripts': ['sample=sample:main',],},
123-
entry_points={"console_scripts": ["btrun=backtrader.btrun:btrun"]},
124128
scripts=["tools/bt-run.py"],
125129
)

0 commit comments

Comments
 (0)