diff --git a/.github/workflows/test-lint-go.yml b/.github/workflows/test-lint-go.yml index ce5bc93..ab8a6d9 100644 --- a/.github/workflows/test-lint-go.yml +++ b/.github/workflows/test-lint-go.yml @@ -27,7 +27,8 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install pytest numpy + pip install -e . + pip install pytest numpy - name: Run pytest run: pytest @@ -40,12 +41,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.13' + - name: Setup uv + uses: astral-sh/setup-uv@v5 - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install flake8 + run: uv sync --frozen --group dev - name: Run flake8 - run: flake8 . + run: uv run flake8 . spellcheck: runs-on: ubuntu-latest @@ -56,12 +57,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.13' + - name: Setup uv + uses: astral-sh/setup-uv@v5 - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install codespell + run: uv sync --frozen --group dev - name: Run codespell - run: codespell + run: uv run codespell type-check: runs-on: ubuntu-latest @@ -72,12 +73,12 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.13' + - name: Setup uv + uses: astral-sh/setup-uv@v5 - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install mypy + run: uv sync --frozen --group dev - name: Run mypy - run: mypy mockito + run: uv run mypy mockito deploy: if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') diff --git a/CHANGES.txt b/CHANGES.txt index 509b4fb..f6f0acf 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,8 @@ MOCKITO CHANGE LOG Release 2.0.0 --------------------------------- +- Packaging is now fully defined via ``pyproject.toml`` (``hatchling`` backend); + the obsolete ``setup.py`` shim has been removed. - Calling `thenAnswer()` without arguments is now allowed and is treated like `thenReturn()` without arguments: the stubbed method will return `None`. - Deprecate `verifyNoMoreInteractions` in favor of `ensureNoUnverifiedInteractions`. diff --git a/docs/conf.py b/docs/conf.py index 6c66f4b..464a9da 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -67,7 +67,7 @@ release = metadata.version("mockito") except metadata.PackageNotFoundError: print("mockito must be installed to build the documentation.") - print("Install from source using `uv sync` or `pip install -e .` in a virtualenv.") + print("Install from source using `uv sync` in the project root.") sys.exit(1) if 'dev' in release: diff --git a/setup.py b/setup.py deleted file mode 100755 index 21d3293..0000000 --- a/setup.py +++ /dev/null @@ -1,26 +0,0 @@ -from setuptools import setup - -setup(name='mockito', - version='0.0.0', - packages=['mockito'], - url='https://github.com/kaste/mockito-python', - maintainer='herr.kaste', - maintainer_email='herr.kaste@gmail.com', - license='MIT', - description='Spying framework', - long_description=open('README.rst').read(), - python_requires='>=3.8', - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: MIT License', - 'Topic :: Software Development :: Testing', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - 'Programming Language :: Python :: 3.13', - 'Programming Language :: Python :: 3.14', - ])