diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a456f8be..33efd207 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: build-and-test: strategy: matrix: - python-version: ["3.9", "3.10", "3.11", "3.12"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: # with pip to make sure it works. run: | source "${HOME}/conda/etc/profile.d/conda.sh" - conda create -p ./cython-env -y "cython>=0.29.30,<3.0" python=${{ matrix.python-version }} gxx zlib --channel conda-forge + conda create -p ./cython-env -y "cython>3.0" python=${{ matrix.python-version }} gxx zlib setuptools --channel conda-forge conda activate ./cython-env python setup.py clean cythonize sdist (cd dist && pip install pybedtools-*.tar.gz && cd $TMPDIR && python -c 'import pybedtools; print(pybedtools.__file__)') diff --git a/pybedtools/__init__.py b/pybedtools/__init__.py index 32771e51..ff58de18 100644 --- a/pybedtools/__init__.py +++ b/pybedtools/__init__.py @@ -12,6 +12,7 @@ Attributes, MalformedBedLineError, IntervalIterator, + create_interval_from_list, ) from . import contrib from .helpers import ( diff --git a/pybedtools/cbedtools.pxd b/pybedtools/cbedtools.pxd index 98faec9f..82223a5c 100644 --- a/pybedtools/cbedtools.pxd +++ b/pybedtools/cbedtools.pxd @@ -1,3 +1,4 @@ +# cython: language_level=3str from cpython cimport bool from libcpp.vector cimport vector from libcpp.string cimport string diff --git a/pybedtools/featurefuncs.pyx b/pybedtools/featurefuncs.pyx index 86d15e22..6f302990 100644 --- a/pybedtools/featurefuncs.pyx +++ b/pybedtools/featurefuncs.pyx @@ -1,7 +1,7 @@ # cython: language_level=2 # distutils: language = c++ from cbedtools cimport Interval -from cbedtools import create_interval_from_list +from pybedtools.cbedtools import create_interval_from_list cpdef extend_fields(Interval feature, int n): diff --git a/pybedtools/version.py b/pybedtools/version.py index 2efba6f2..9260f8d0 100644 --- a/pybedtools/version.py +++ b/pybedtools/version.py @@ -1,4 +1,4 @@ # THIS FILE IS GENERATED FROM SETUP.PY -version = '0.11.0' +version = '0.12.0' __version__ = version \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4b2126a8..a2894bf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,15 @@ [build-system] -requires = ["setuptools>=61.0", "wheel", "Cython>=0.29.30,<3.0"] -build-backend = "setuptools.build_meta:__legacy__" \ No newline at end of file +requires = ["setuptools>=61.0", "wheel", "Cython>=3.0"] +build-backend = "setuptools.build_meta:__legacy__" + +[project] +name = "pybedtools" +dynamic = ["version", "maintainers", "license", "classifiers", "readme"] +description='Wrapper around BEDTools for bioinformatics work' +dependencies = [ + "numpy", + "pysam", + "pandas" +] +[tool.pytest.ini_options] +testpaths = ["pybedtools"] diff --git a/setup.cfg b/setup.cfg index e7a90a34..df7d0d67 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,5 @@ -[wheel] -universal = 1 +[bdist_wheel] + [nosetests] detailed-errors = 1 doctest-extension = .pyx .py diff --git a/setup.py b/setup.py index 3c374f67..bf234d24 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,6 @@ """ try: - from Cython.Build import build_ext as cython_build_ext from Cython.Build import cythonize HAVE_CYTHON = True except ImportError: @@ -52,12 +51,7 @@ # Try bootstrapping setuptools if it doesn't exist. This is for using the # `develop` command, which is very useful for in-place development work. try: - import pkg_resources - try: - pkg_resources.require("setuptools>=0.6c5") - except pkg_resources.VersionConflict: - from ez_setup import use_setuptools - use_setuptools(version="0.6c5") + import setuptools from setuptools import setup, Command except ImportError: sys.exit( @@ -68,15 +62,15 @@ curdir = os.path.abspath(os.path.dirname(__file__)) # These imports need to be here; setuptools needs to be imported first. -from distutils.extension import Extension # noqa: E402 -from distutils.command.build import build # noqa: E402 -from distutils.command.build_ext import build_ext # noqa: E402 -from distutils.command.sdist import sdist # noqa: E402 -import distutils.log - +from setuptools.extension import Extension # noqa: E402 +from setuptools.command.build import build # noqa: E402 +from setuptools.command.build_ext import build_ext # noqa: E402 +from setuptools.command.sdist import sdist # noqa: E402 +import setuptools.logging +setuptools.logging.configure() MAJ = 0 -MIN = 11 +MIN = 12 REV = 0 VERSION = '%d.%d.%d' % (MAJ, MIN, REV) @@ -209,7 +203,7 @@ def build_extensions(self): ''') self.announce( "Trying to generate the following missing files:\n%s" % "\n".join(missing_src), - level=distutils.log.INFO) + level=0) for src in missing_src: assert src in ext.sources (root, extn) = os.path.splitext(src) @@ -266,7 +260,6 @@ def run(self): } if USE_CYTHON: - cmdclass['build_ext'] = cython_build_ext cmdclass['cythonize'] = Cythonize else: cmdclass['build_ext'] = InformativeBuildExt @@ -296,7 +289,6 @@ def run(self): long_description=README, zip_safe=False, setup_requires=[], - install_requires=['pysam', 'numpy'], classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Science/Research', @@ -324,6 +316,5 @@ def run(self): "*.h"], 'src': ['src/*'], }, - include_package_data=True, - language_level=2, + include_package_data=True )