mirror of
https://github.com/wassname/catalyst.git
synced 2026-08-12 11:50:11 +08:00
Extended Asset to create TradingPair allowing us to store leverage value
This commit is contained in:
@@ -38,6 +38,7 @@ class LazyBuildExtCommandClass(dict):
|
||||
Lazy command class that defers operations requiring Cython and numpy until
|
||||
they've actually been downloaded and installed by setup_requires.
|
||||
"""
|
||||
|
||||
def __contains__(self, key):
|
||||
return (
|
||||
key == 'build_ext'
|
||||
@@ -62,6 +63,7 @@ class LazyBuildExtCommandClass(dict):
|
||||
Custom build_ext command that lazily adds numpy's include_dir to
|
||||
extensions.
|
||||
"""
|
||||
|
||||
def build_extensions(self):
|
||||
"""
|
||||
Lazily append numpy's include directory to Extension includes.
|
||||
@@ -75,6 +77,7 @@ class LazyBuildExtCommandClass(dict):
|
||||
ext.include_dirs.append(numpy_incl)
|
||||
|
||||
super(build_ext, self).build_extensions()
|
||||
|
||||
return build_ext
|
||||
|
||||
|
||||
@@ -100,7 +103,8 @@ ext_modules = [
|
||||
window_specialization('label'),
|
||||
Extension('catalyst.lib.rank', ['catalyst/lib/rank.pyx']),
|
||||
Extension('catalyst.data._equities', ['catalyst/data/_equities.pyx']),
|
||||
Extension('catalyst.data._adjustments', ['catalyst/data/_adjustments.pyx']),
|
||||
Extension('catalyst.data._adjustments',
|
||||
['catalyst/data/_adjustments.pyx']),
|
||||
Extension('catalyst._protocol', ['catalyst/_protocol.pyx']),
|
||||
Extension('catalyst.gens.sim_engine', ['catalyst/gens/sim_engine.pyx']),
|
||||
Extension(
|
||||
@@ -117,7 +121,6 @@ ext_modules = [
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
STR_TO_CMP = {
|
||||
'<': lt,
|
||||
'<=': le,
|
||||
@@ -264,6 +267,7 @@ def setup_requirements(requirements_path, module_names, strict_bounds,
|
||||
)
|
||||
return module_lines
|
||||
|
||||
|
||||
conda_build = os.path.basename(sys.argv[0]) in ('conda-build', # unix
|
||||
'conda-build-script.py') # win
|
||||
|
||||
@@ -295,7 +299,7 @@ setup(
|
||||
ext_modules=ext_modules,
|
||||
include_package_data=True,
|
||||
package_data={root.replace(os.sep, '.'):
|
||||
['*.pyi', '*.pyx', '*.pxi', '*.pxd']
|
||||
['*.pyi', '*.pyx', '*.pxi', '*.pxd']
|
||||
for root, dirnames, filenames in os.walk('catalyst')
|
||||
if '__pycache__' not in root},
|
||||
license='Apache 2.0',
|
||||
@@ -314,7 +318,6 @@ setup(
|
||||
'Topic :: System :: Distributed Computing',
|
||||
],
|
||||
install_requires=install_requires(conda_format=conda_build),
|
||||
extras_require=extras_requires(conda_format=conda_build,
|
||||
install_requires=['six']),
|
||||
extras_require=extras_requires(conda_format=conda_build),
|
||||
**conditional_arguments
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user