Skip to content

Commit 8569266

Browse files
author
Devon Ryan
committed
setup.py is actually needed, but we can slim it down and switch to sysconfig
1 parent cdaf52b commit 8569266

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=42", "setuptools-scm"]
2+
requires = ["setuptools>=74.1", "setuptools-scm"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -34,7 +34,7 @@ homepage = "https://github.com/deeptools/py2bit"
3434
# Override setuptools autodiscovery algorithm
3535
# Only include package test data/source for wheel distribution
3636
include-package-data = true
37-
packages = ["py2bit", "py2bitTest"]
37+
packages = ["py2bitTest"]
3838

3939
# Enable version inference from scm
4040
[tool.setuptools_scm]

setup.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from setuptools import setup, Extension
2+
import glob
3+
import sysconfig
4+
5+
srcs = [x for x in
6+
glob.glob("lib2bit/*.c")]
7+
srcs.append("py2bit.c")
8+
9+
additional_libs = [sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LIBPL")]
10+
11+
module1 = Extension('py2bit',
12+
sources = srcs,
13+
library_dirs = additional_libs,
14+
include_dirs = ['lib2bit', sysconfig.get_config_var("INCLUDEPY")])
15+
16+
setup_args = dict(ext_modules=[module1])
17+
setup(**setup_args)

0 commit comments

Comments
 (0)