Skip to content

Commit

Permalink
Merge pull request #10 from regro/packaging
Browse files Browse the repository at this point in the history
REF move to the modern system
  • Loading branch information
beckermr authored Aug 11, 2023
2 parents 4dea7ab + ce57c28 commit 09dc9c0
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
28 changes: 27 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: conda-incubator/setup-miniconda@v2
with:
Expand All @@ -30,14 +32,38 @@ jobs:
shell: bash -l {0}
run: |
mamba install --yes --file=requirements.txt
mamba install --yes pytest flake8 flaky pip
mamba install --yes pytest flake8 flaky pip python-build setuptools_scm>=7 setuptools>=45 toml
pip install -e .
- name: lint
shell: bash -l {0}
run: |
flake8 conda_forge_feedstock_check_solvable
- name: test versions
shell: bash -el {0}
run: |
pip uninstall conda-forge-feedstock-check-solvable --yes
[[ $(python setup.py --version) != "0.0.0" ]] || exit 1
rm -rf dist/*
python setup.py sdist
pip install --no-deps --no-build-isolation dist/*.tar.gz
pushd ..
python -c "import conda_forge_feedstock_check_solvable; assert conda_forge_feedstock_check_solvable.__version__ != '0.0.0'"
popd
pip uninstall conda-forge-feedstock-check-solvable --yes
rm -rf dist/*
python -m build --sdist . --outdir dist
pip install --no-deps --no-build-isolation dist/*.tar.gz
pushd ..
python -c "import conda_forge_feedstock_check_solvable; assert conda_forge_feedstock_check_solvable.__version__ != '0.0.0'"
popd
pip uninstall conda-forge-feedstock-check-solvable --yes
python -m pip install -v --no-deps --no-build-isolation -e .
- name: test
shell: bash -l {0}
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,4 @@ dmypy.json
.pyre/

conda_forge_feedstock_check_solvable.egg-info/
conda_forge_feedstock_check_solvable/_version.py
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include conda-forge-feedstock-check-solvable/_version.py
include requirements.txt
include LICENSE
recursive-exclude tests *
1 change: 0 additions & 1 deletion conda_forge_feedstock_check_solvable/_version.py

This file was deleted.

36 changes: 36 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[build-system]
requires = [
"setuptools>=45",
"setuptools_scm>=7",
"tomli>=1.0.0; python_version < '3.11'",
]
build-backend = "setuptools.build_meta"

[project]
name = "conda-forge-feedstock-check-solvable"
authors = [
{name = "conda-forge-tick development team", email = "[email protected]"},
]
description = "A mamba-based package to check if a conda-forge feedstock is solvable."
dynamic = ["version", "dependencies"]
license = {file = "LICENSE"}
readme = "README.md"

[project.urls]
home = "https://github.com/regro/conda-forge-feedstock-check-solvable"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools.packages.find]
exclude = ['tests*']

[tool.setuptools_scm]
write_to = "conda_forge_feedstock_check_solvable/_version.py"
write_to_template = "__version__ = '{version}'\n"

[tool.black]
line-length = 88

[tool.isort]
profile = "black"
19 changes: 2 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
from setuptools import setup, find_packages
from setuptools import setup

__version__ = None
with open("conda_forge_feedstock_check_solvable/_version.py") as fp:
exec(fp.read().strip())

setup(
name="conda-forge-feedstock-check-solvable",
version=__version__,
description=(
"A mamba-based package to check if a "
"conda-forge feedstock is solvable."
),
author="Conda-forge-tick Development Team",
author_email="",
url="https://github.com/regro/conda-forge-feedstock-check-solvable",
packages=find_packages(exclude=["tests"]),
)
setup()

0 comments on commit 09dc9c0

Please sign in to comment.