Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempts packaging #362

Merged
merged 6 commits into from
Nov 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/tests_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Compile library
run: |
cd aequilibrae/paths
python3 setup_Assignment.py build_ext --inplace
python3 setup_assignment.py build_ext --inplace
cd ..
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Compile library
run: |
cd aequilibrae/paths
python setup_Assignment.py build_ext --inplace
python setup_assignment.py build_ext --inplace
cd ..
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Compile library
run: |
cd aequilibrae/paths
python3 setup_Assignment.py build_ext --inplace
python3 setup_assignment.py build_ext --inplace
cd ..
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_linux_with_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Compile library
run: |
cd aequilibrae/paths
python3 setup_Assignment.py build_ext --inplace
python3 setup_assignment.py build_ext --inplace
cd ..
cd ..
- name: Generate coverage report
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
- name: Compile library
run: |
cd aequilibrae/paths
python setup_Assignment.py build_ext --inplace
python setup_assignment.py build_ext --inplace
cd ../..
- name: Build
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
global-include *.pyx
global-include *.pxd
2 changes: 0 additions & 2 deletions aequilibrae/distribution/gravity_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from aequilibrae.distribution.synthetic_gravity_model import SyntheticGravityModel
from aequilibrae.matrix import AequilibraeMatrix, AequilibraeData

sys.dont_write_bytecode = True

spec = iutil.find_spec("openmatrix")
has_omx = spec is not None

Expand Down
2 changes: 1 addition & 1 deletion aequilibrae/paths/parameters.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ cdef double INFINITE = 1.79769313e+308

VERSION = 0.7
MINOR_VRSN = 6
binary_version = "0.7.6b"
binary_version = "0.7.7"
release_name = "Queluz"
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import sys
import platform

import numpy as np
import pyarrow as pa
import Cython.Compiler.Options
from Cython.Distutils import build_ext
from Cython.Build import cythonize
import shutil

# Cython.Compiler.Options.annotate = True

try:
from setuptools import setup
Expand All @@ -16,15 +11,14 @@
from distutils.core import setup
from distutils.extension import Extension

sys.dont_write_bytecode = True

if "WINDOWS" in platform.platform().upper():
ext_modules = [
Extension(
"AoN",
["AoN.pyx"],
extra_compile_args=["/openmp"],
extra_link_args=["/openmp"],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=[np.get_include(), pa.get_include()],
)
]
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ documentation for all versions since 0.5.3.
* `0.7.3 <https://aequilibrae.com/python/V.0.7.3/>`_
* `0.7.4 <https://aequilibrae.com/python/V.0.7.4/>`_
* `0.7.5 <https://aequilibrae.com/python/V.0.7.5/>`_
* `0.7.6b <https://aequilibrae.com/python/V.0.7.6b/>`_
* `0.7.6 <https://aequilibrae.com/python/V.0.7.6/>`_
* `0.7.7 <https://aequilibrae.com/python/V.0.7.7/>`_

* `Develop Branch (upcoming version) <https://aequilibrae.com/python/develop/>`_
This documentation correspond to software version:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ target-version = ['py36', 'py37', 'py38']
include = '\.pyi?$'

[build-system]
requires = ["setuptools", "numpy<1.22", "cython", "pyaml", "pyqt5", "requests", "scipy", "shapely", "pandas", "pyarrow<10.0.0", "pyproj"]
requires = ["setuptools", "numpy<1.22", "cython", "pyaml", "pyqt5", "requests", "scipy", "shapely", "pandas", "pyarrow<10.0.0", "pyproj", "wheel"]
12 changes: 9 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@
include_dirs.append(pa.get_include())

whole_path = join(dirname(os.path.realpath(__file__)), "aequilibrae/paths", "AoN.pyx")
ext_module = Extension("aequilibrae.paths.AoN", [whole_path], include_dirs=include_dirs, language="c++")
ext_module = Extension(
"aequilibrae.paths.AoN",
[whole_path],
define_macros=[("NPY_NO_DEPRECATED_API", "NPY_1_7_API_VERSION")],
include_dirs=include_dirs,
language="c++",
)

# this is for building pyarrow on platforms w/o wheel, like our one of our macos/python combos
if "WINDOWS" not in platform.platform().upper():
Expand All @@ -37,8 +43,8 @@

pkg_data = {
"aequilibrae.reference_files": ["spatialite.sqlite", "nauru.zip", "sioux_falls.zip"],
"aequilibrae.paths": ["parameters.pxi"],
"aequilibrae": ["parameters.yml"],
"aequilibrae.paths": ["parameters.pxi", "*.pyx"],
"aequilibrae": ["./parameters.yml"],
"aequilibrae.project": ["database_specification/tables/*.*", "database_specification/triggers/*.*"],
}
loose_modules = ["__version__", "parameters"]
Expand Down
2 changes: 1 addition & 1 deletion tests/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@

os.chdir(pth)
subprocess.Popen(
f"{sys.executable} setup_Assignment.py build_ext --inplace", shell=True, stdout=subprocess.PIPE
f"{sys.executable} setup_assignment.py build_ext --inplace", shell=True, stdout=subprocess.PIPE
).stdout.read()