Skip to content

Commit

Permalink
The package can be compatible with both Python 2 and Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
haiiliin committed Jun 18, 2024
1 parent 88e630f commit 0f40f31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 1 addition & 2 deletions binder/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import sys
import subprocess
from pathlib import Path

try:
from ._version import __version__ as _default_version
Expand All @@ -24,7 +23,7 @@ def _get_version():
# Only shell out to a git subprocess if really needed, and not on a
# shallow clone, such as those used by CI, as the latter would trigger
# a warning from setuptools_scm.
root = Path(__file__).resolve().parents[1]
root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if (root / ".git").exists() and not (root / ".git/shallow").exists():
try:
import setuptools_scm
Expand Down
14 changes: 12 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,17 @@ authors = [
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.0",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand All @@ -21,7 +31,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
requires-python = ">=3.8"
requires-python = ">=2.7"

[project.urls]
Homepage = "https://github.com/RosettaCommons/binder/"
Expand Down Expand Up @@ -52,7 +62,7 @@ cmake.define.LLVM_ENABLE_PROJECTS = "clang"

# Wheel configuration
wheel.packages = ["binder"]
wheel.py-api = "py3"
wheel.py-api = "py2.py3"
wheel.expand-macos-universal-tags = true

[tool.cibuildwheel]
Expand Down

0 comments on commit 0f40f31

Please sign in to comment.