Skip to content

Commit

Permalink
MAINT: setup.py -> pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgehret authored Jan 7, 2025
2 parents 0f27373 + 5c96b06 commit a9e308e
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 2,401 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
moshpit/_version.py export-subst
pyproject.toml export-subst
1 change: 1 addition & 0 deletions .github/workflows/ci-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev
with:
distro: metagenome
recipe-path: 'conda-recipe'
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ runinfo

# vscode
.vscode/

# Version file from versioningit
_version.py
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ test: all
pytest

install: all
$(PYTHON) setup.py install && \
$(PYTHON) -m pip install -v . && \
mkdir -p $(PREFIX)/etc/conda/activate.d && \
cp hooks/50_activate_mosh_tab_completion.sh $(PREFIX)/etc/conda/activate.d/

Expand Down
25 changes: 10 additions & 15 deletions ci/recipe/meta.yaml → conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
{% set data = load_setup_py_data() %}
{% set version = data.get('version') or 'placehold' %}

package:
name: moshpit
version: {{ version }}

version: {{ PLUGIN_VERSION }}
source:
path: ../..

path: ..
build:
script: make install
entry_points:
- mosh=moshpit.__main__:mosh

requirements:
host:
- python {{ python }}
- python {{ python }}
- pip
- setuptools

- versioningit
- wheel
run:
- python {{ python }}
- python {{ python }}
- pip
- click >=8.1
- qiime2 {{ qiime2_epoch }}.*
- q2cli {{ qiime2_epoch }}.*

build:
- setuptools
- versioningit
test:
requires:
- qiime2 >={{ qiime2 }}
- pytest

imports:
- moshpit

commands:
- mosh --help

about:
home: https://bokulich-lab.github.io/moshpit-docs/intro.html
license: BSD-3-Clause
Expand Down
9 changes: 4 additions & 5 deletions moshpit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import qiime2
import importlib

from ._version import get_versions

__version__ = get_versions()['version']
del get_versions
try:
from ._version import __version__
except ModuleNotFoundError:
__version__ = '0.0.0+notfound'


def __getattr__(name):
Expand Down Expand Up @@ -56,4 +56,3 @@ def find_spec(self, name, path=None, target=None):


sys.meta_path += [__QIIMEProxyImport()]

Loading

0 comments on commit a9e308e

Please sign in to comment.