Skip to content

Commit

Permalink
update package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mirca committed Mar 1, 2024
1 parent e827cf4 commit 4fad2ea
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 16 deletions.
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[build-system]
requires = [
"setuptools>=40.6.0",
"wheel",
"setuptools_scm",
"oldest-supported-numpy",
"pybind11>=2.4",
]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 79

[tool.isort]
line_length = 79
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true

[tool.pytest.ini_options]
addopts = "-v"
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

17 changes: 12 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __str__(self):
ext_modules = [
Extension(
"riskparityportfolio.vanilla",
["riskparityportfolio/vanilla.cpp"],
["src/riskparityportfolio/vanilla.cpp"],
include_dirs=[
# Path to pybind11 headers
get_pybind_include(),
Expand Down Expand Up @@ -69,7 +69,10 @@ def cpp_flag(compiler):
if sys.platform == "darwin":
flags = ["-std=c++14", "-std=c++11"]
else:
flags = ["-std=c++17", "-std=c++14", "-std=c++11"]
flags = ["-std=c++20",
"-std=c++17",
"-std=c++14",
"-std=c++11"]

for flag in flags:
if has_flag(compiler, flag):
Expand Down Expand Up @@ -129,12 +132,16 @@ def build_extensions(self):
url="https://github.com/dppalomar/riskparity.py",
description="Blazingly fast design of risk parity portfolios",
license="MIT",
package_dir={"riskparityportfolio": "riskparityportfolio"},
package_dir={"riskparityportfolio": "src/riskparityportfolio"},
packages=["riskparityportfolio"],
long_description="",
ext_modules=ext_modules,
install_requires=["pybind11>=2.4", "numpy", "jaxlib", "jax", "quadprog", "tqdm"],
setup_requires=["pybind11>=2.4", "numpy", "jaxlib", "jax", "quadprog", "tqdm"],
setup_requires=["pybind11>=2.4",
"numpy",
"jaxlib",
"jax",
"quadprog>=0.1.12",
"tqdm"],
cmdclass={"build_ext": BuildExt},
classifiers=[
"Development Status :: 3 - Alpha",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4fad2ea

Please sign in to comment.