Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
taxtastic/data/ver
taxtastic/taxtastic.egg-info/
__pycache__
!setup.py
!pyproject.toml
!MANINFEST.in
!README.rst
!taxtastic/
Expand Down
5 changes: 5 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
change log for taxtastic
==========================

0.11.2-dev
==========

* Migrated setup.py to pyproject.toml [GH-172]

0.11.1
======

Expand Down
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
FROM python:3.11-slim-bullseye

ARG VERSION
ENV PIP_ROOT_USER_ACTION=ignore TAXTASTIC_VERSION=${VERSION#v}
ENV PIP_ROOT_USER_ACTION=ignore

RUN apt-get -y update && apt-get upgrade -y && apt-get install -y unzip wget
RUN apt-get -y update && apt-get upgrade -y && apt-get install -y git unzip wget

WORKDIR /opt/build

COPY dev/install_pplacer.sh ./
RUN /opt/build/install_pplacer.sh /usr/local

COPY setup.py MANIFEST.in README.rst ./
COPY pyproject.toml MANIFEST.in README.rst ./
COPY taxtastic/ ./taxtastic/
COPY .git/ ./.git/
RUN pip3 install --upgrade pip && pip3 install .

WORKDIR /opt/run
Expand Down
50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
build-backend = "setuptools.build_meta"

[project]
authors = [
{email = "[email protected]", name = "Noah Hoffman"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"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",
"Topic :: Scientific/Engineering :: Bio-Informatics"
]
dependencies = [
"decorator",
"DendroPy",
"fastalite",
"jinja2",
"psycopg-binary",
"psycopg2-binary",
"PyYAML",
"sqlalchemy>=2",
"sqlparse"
]
description = "Tools for taxonomic naming and annotation"
dynamic = ["version"] # https://setuptools-scm.readthedocs.io/en/latest/
license = {text = "GPL-3.0-only"}
maintainers = [
{email = "[email protected]", name = "Chris Rosenthal"},
{email = "[email protected]", name="Dan Hoogestraat"}
]
name = "taxtastic"
readme = "README.rst"
requires-python = ">=3.8"

[project.urls]
repository = "https://github.com/fhcrc/taxtastic"

[project.scripts]
taxit = "taxtastic.scripts.taxit:main"

[tool.setuptools.packages.find]
exclude = ["testfiles", "tests"]

[tool.setuptools_scm]
# can be empty if no extra settings are needed, presence enables setuptools-scm
67 changes: 0 additions & 67 deletions setup.py

This file was deleted.

17 changes: 7 additions & 10 deletions taxtastic/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import os
from importlib.metadata import version, PackageNotFoundError

ver = os.path.join(os.path.dirname(__file__), 'data', 'ver')
if 'TAXTASTIC_VERSION' in os.environ:
__version__ = os.environ['TAXTASTIC_VERSION']
elif os.path.isfile(ver):
with open(ver) as f:
__version__ = f.read().strip().replace('-', '+', 1).replace('-', '.')
__version__ = __version__.lstrip('v')
else:
__version__ = ''
# https://setuptools-scm.readthedocs.io/en/latest/usage/#at-runtime
try:
__version__ = version("taxtastic")
except PackageNotFoundError:
# package is not installed
pass