Skip to content

Commit

Permalink
Fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
vhaasteren committed Nov 8, 2023
2 parents 5b90170 + 44b294a commit e87a55c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 30 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
python-version: '3.x'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel cython cibuildwheel==2.3.1
python -m pip install --upgrade pip setuptools wheel cython cibuildwheel==2.3.1 setuptools_scm
- name: Install project dependencies
run: |
pip install "numpy>=1.16.3" --only-binary=numpy "scipy>=1.2.0" --only-binary=scipy
Expand Down Expand Up @@ -98,18 +98,17 @@ jobs:
uses: actions/download-artifact@v3
with:
name: dist
path: ./
- name: List files in dist
run: echo "Content of dist:" && ls -lah dist/ && echo "Content of ./:" && ls -lah ./
path: ./dist/
- name: Publish to PyPI
run: |
python -m pip install --upgrade twine
python -m twine upload ./dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
#TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
TWINE_REPOSITORY_URL: https://upload.pypi.org/legacy/
#TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
#TWINE_REPOSITORY_URL: https://test.pypi.org/legacy/

conda-package:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion fastshermanmorrison/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
from . import fastshermanmorrison
from .version import __version__

try:
from ._version import __version__
except ImportError:
# _version.py will be missing during package setup when setuptools_scm has not yet written it
__version__ = "unknown"
1 change: 0 additions & 1 deletion fastshermanmorrison/version.py

This file was deleted.

3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ classifiers = [
"Bug Tracker" = "https://github.com/vhaasteren/fastshermanmorrison/issues"

[tool.setuptools_scm]
# Optional: Write the version number to your package's __version__.py
write_to = "fastshermanmorrison/version.py"
write_to = "fastshermanmorrison/_version.py"
write_to_template = "__version__ = '{version}'"
23 changes: 4 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,6 @@
import os
from setuptools import setup, find_packages
from setuptools import Extension
from distutils.command.build import build as build_orig
from setuptools.command.build_py import build_py

# Dynamically calculate the version based on fastshermanmorrison.VERSION.
version_path = os.path.join(
os.path.dirname(__file__), "fastshermanmorrison", "version.py"
)
version_ns = {}
with open(version_path) as f:
exec(f.read(), {}, version_ns)


class BuildPyCommand(build_py):
# Ensure that build_py command runs before build_ext.
def run(self):
self.run_command("build_ext")
return super().run()


ext_modules = [
Extension(
Expand Down Expand Up @@ -49,7 +31,10 @@ def finalize_options(self):

setup(
name="fastshermanmorrison-pulsar",
version=version_ns["__version__"],
use_scm_version={
"write_to": "fastshermanmorrison/_version.py",
"write_to_template": "__version__ = '{version}'",
},
description="Fast Sherman Morrison calculations for Enterprise",
license="MIT",
author="Rutger van Haasteren",
Expand Down

0 comments on commit e87a55c

Please sign in to comment.