Skip to content

Commit

Permalink
Reconfigure package
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Mar 29, 2024
1 parent 0f7d9ee commit 0199d3a
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include *.py
recursive-include src/qmllib *.f90
global-exclude *~ *.py[cod] *.so
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ all: env setup

env:
${mamba} env create -f ./environment_dev.yaml -p ./env --quiet
# ${pip} install -e .
${python} -m pre_commit install
${python} -m pip install -e .

setup: ./.git/hooks/pre-commit

Expand All @@ -35,9 +36,9 @@ compile:
${python} _compile.py

build:
@# ${python} -m build .
${python} -m build --sdist --skip-dependency-check .
@# ${python} -m pip wheel --no-deps -v .
${python} -m pip wheel -v .
@# ${python} -m pip wheel -v .
@#ls *.whl

clean:
Expand All @@ -46,8 +47,10 @@ clean:
-name "*.pyc" \
-name ".pyo" \
-delete
rm -rf ./src/*.egg-info/
rm -rf *.whl
rm -fr ./build/ ./__pycache__/
rm -rf ./build/ ./__pycache__/
rm -rf ./dist/

clean-env:
rm -rf ./env/
Expand Down
2 changes: 1 addition & 1 deletion _compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ def main():
for module_name, module_sources in f90_modules.items():

path = Path(module_name)

parent = path.parent
stem = path.stem

cwd = Path("src/qmllib") / parent
cmd = ["python", "-m", "numpy.f2py", "-c"] + flags + module_sources + ["-m", str(stem)]
print(cwd, " ".join(cmd))
Expand Down
3 changes: 2 additions & 1 deletion environment_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ dependencies:
- monkeytype
- numpy
- pandas
- pyarrow
- pip
- pre-commit
- pyarrow
- pytest
- scikit-learn
- scipy
# build
- build
- meson
- ninja
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import sys
from pathlib import Path

from setuptools import setup

try:
import _compile
except ImportError:
import sys
from pathlib import Path

sys.path.append(str(Path(__file__).resolve().parent))
import _compile

Expand Down

0 comments on commit 0199d3a

Please sign in to comment.