diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/ci.yml similarity index 51% rename from .github/workflows/c-cpp.yml rename to .github/workflows/ci.yml index a383a52..a47de43 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + - name: Build and test + run: | + mkdir build + cd build + cmake .. + cmake --build . + cd .. diff --git a/.gitignore b/.gitignore index cce85a7..6566ce6 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,13 @@ __pycache__ _skbuild/ dist/ build/ +<<<<<<< HEAD +_skbuild/ +lib/ +_cmake_test_compile/ +======= lib/ +>>>>>>> master _version.py *.log diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fad1f8..bfcce46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.22...3.28) project(vonMises) - set(CMAKE_CXX_STANDARD 11) - set(SOURCES src/eigenlib/eigen_API.cpp src/eigenlib/logger.cpp @@ -17,8 +15,8 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/src/lib) include_directories(src/lib) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fopenmp") - add_library(eigen SHARED ${SOURCES}) + +install(TARGETS eigen LIBRARY DESTINATION lib) diff --git a/environment.yml b/environment.yml index 04bce48..28675fa 100644 --- a/environment.yml +++ b/environment.yml @@ -17,5 +17,3 @@ dependencies: - ruff - pytest - tqdm - - pip: - - - -r requirements.txt diff --git a/install.py b/install.py index 59518c3..f89df54 100644 --- a/install.py +++ b/install.py @@ -7,7 +7,10 @@ install_cmd = shlex.split("python -m pip install -e . -v") setup_directory = os.getcwd() + with open("build.log", "w") as log: +<<<<<<< HEAD +======= if not os.path.exists("build"): os.makedirs("build") os.chdir("build") @@ -17,6 +20,7 @@ os.chdir(setup_directory) with open("build.log", "a") as log: +>>>>>>> master rv = subprocess.Popen(wheel_cmd, stdout=log, stderr=log) while rv.poll() is None: time.sleep(0.5) diff --git a/pyproject.toml b/pyproject.toml index 3234182..e9b85bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,43 @@ [build-system] +<<<<<<< HEAD +build-backend = "setuptools.build_meta" +requires = [ + "setuptools", + "setuptools_scm", + "scikit-build", + "cmake", + "ninja", +] + +[project] +name = "vonMises" +authors = [{name = "Saud Zahir", email = "m.saud.zahir@gmail.com"}] +classifiers = [ + "Programming Language :: Python :: 3", + "Programming Language :: C++ :: 11", + "License :: proprietary", + "Operating System :: Linux", +] +description = "Numerical Algorithm for Eigen Value Problems." +keywords = ["numerical"] +license = {file = "LICENSE"} +requires-python = ">=3.11" +dynamic = ["version"] + +[project.urls] +"Homepage" = "https://github.com/saudzahirr/vonMises" + +[project.scripts] +"vonMises" = "src.__main__:main" + +[tool.setuptools.packages.find] +where = ["."] + +[tool.setuptools_scm] +version_file = "src/_version.py" +======= requires = ["setuptools", "setuptools_scm", "wheel"] [tool.setuptools_scm] -version_file = "src/_version.py" \ No newline at end of file +version_file = "src/_version.py" +>>>>>>> master diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 04bc36f..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -importlib-metadata; python_version < "3.10" diff --git a/ruff-lint.bat b/ruff-lint.bat deleted file mode 100644 index c4fecc6..0000000 --- a/ruff-lint.bat +++ /dev/null @@ -1,6 +0,0 @@ -@echo off -ruff --version -ruff --fix . -ruff format . -ruff format --check . -ruff check --output-format=github . \ No newline at end of file diff --git a/ruff-lint.sh b/ruff-lint.sh deleted file mode 100644 index 71d3ff2..0000000 --- a/ruff-lint.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -ruff --version -ruff --fix . -ruff format . -ruff format --check . -ruff check --output-format=github . diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2685414..0000000 --- a/setup.cfg +++ /dev/null @@ -1,34 +0,0 @@ -[metadata] -name = vonMises -version = 1.0.0 -author = Saud Zahir -author_email= m.saud.zahir@gmail.com -description = Numerical Algorithm for Eigen Value Problems -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8 -home_page = https://github.com/saudzahirr/vonMises -project_urls = - Source Code = https://github.com/saudzahirr/vonMises -license = MIT -classifiers = - Development Status :: 4 - Beta - License :: OSI Approved :: MIT License - Topic :: Scientific/Engineering - Programming Language :: C++ :: 11 - Programming Language :: Python :: 3 - Natural Language :: English - Operating System :: POSIX :: Linux - Operating System :: Microsoft :: Windows - Architecture :: AMD64 - -[options] -packages = find: -include_package_data = True -install_requires = - numpy - scipy - importlib-metadata; python_version < "3.10" - -[options.entry_points] -console_scripts = - vonMises = src.__main__:main diff --git a/setup.py b/setup.py index b908cbe..020e64c 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,3 @@ -import setuptools +from skbuild import setup -setuptools.setup() +setup()