diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 70f67d2..19d44af 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -20,13 +20,13 @@ jobs: name: Build wheels on ${{ matrix.os }} runs-on: ${{ matrix.os }} env: - CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" + CIBW_ARCHS_MACOS: "x86_64 arm64" strategy: matrix: - os: [ubuntu-20.04, windows-latest, macos-10.15] + os: [ubuntu-latest, windows-latest, macos-latest] cibw_archs: ["auto"] include: - - os: ubuntu-20.04 + - os: ubuntu-latest cibw_archs : "aarch64" steps: @@ -36,57 +36,55 @@ jobs: with: platforms: arm64 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.7' - - - name: Install cibuildwheel - run: | - python -m pip install cibuildwheel==2.3.0 + python-version: '3.x' - name: Build wheels - run: | - python -m cibuildwheel --output-dir wheelhouse - - uses: actions/upload-artifact@v2 + uses: pypa/cibuildwheel@v2.18.0 + - uses: actions/upload-artifact@v4 with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} path: ./wheelhouse/*.whl build_sdist: name: Build source distribution runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.7' + python-version: '3.x' - name: Build sdist - run: | - python -m pip install cython numpy setuptools_scm - python setup.py sdist - - - uses: actions/upload-artifact@v2 + run: pipx run build --sdist + - uses: actions/upload-artifact@v4 with: + name: cibw-sdist path: dist/*.tar.gz upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # upload to PyPI on every tag starting with 'v' - # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') - # alternatively, to publish when a GitHub Release is created, use the following rule: + environment: pypi + # upload to PyPI on every tag starting with 'v' + # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + # alternatively, to publish when a GitHub Release is created, use the following rule: if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v2 + - name: Download artifacts + uses: actions/download-artifact@v4 with: - name: artifact + # unpacks all CIBW artifacts into dist/ + pattern: cibw-* path: dist - - - uses: pypa/gh-action-pypi-publish@master + merge-multiple: true + - name: Upload release to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypitoken }} diff --git a/cpnest/NestedSampling.py b/cpnest/NestedSampling.py index c6a3f5a..b9b0f23 100644 --- a/cpnest/NestedSampling.py +++ b/cpnest/NestedSampling.py @@ -371,8 +371,8 @@ def get_worst_n_live_points(self, n): for evolution """ self.worst = np.arange(n) - self.logLmin.value = np.float128(self.params[n-1].logL) - return np.float128(self.logLmin.value) + self.logLmin.value = np.float(self.params[n-1].logL) + return self.logLmin.value def check_insertion_indices(self, rolling=True, filename=None): """ diff --git a/pyproject.toml b/pyproject.toml index 9a5d7d5..58bc354 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,2 +1,6 @@ [build-system] requires = ["setuptools_scm", "numpy", "cython"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] + diff --git a/setup.py b/setup.py index 0e130c5..17f570e 100644 --- a/setup.py +++ b/setup.py @@ -59,13 +59,12 @@ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8'], + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.7'], keywords='nested sampling bayesian inference', packages=['cpnest'], install_requires=requirements,