Skip to content

Commit 35ed884

Browse files
authored
build(py): Remove py/pyproject.toml altogether (#5314)
1 parent d626c2a commit 35ed884

File tree

2 files changed

+25
-51
lines changed

2 files changed

+25
-51
lines changed

py/pyproject.toml

Lines changed: 0 additions & 15 deletions
This file was deleted.

py/setup.py

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import zipfile
77
import tempfile
88
import subprocess
9-
from contextlib import contextmanager
109
from setuptools import setup, find_packages
1110
from distutils.command.sdist import sdist
1211

@@ -46,15 +45,6 @@ def run(self):
4645
sdist.run(self)
4746

4847

49-
@contextmanager
50-
def ignore_pyproject(*args, **kwargs):
51-
shutil.move("pyproject.toml", "pyproject.toml-bkp")
52-
try:
53-
yield
54-
finally:
55-
shutil.move("pyproject.toml-bkp", "pyproject.toml")
56-
57-
5848
def build_native(spec):
5949
cmd = ["cargo", "build", "-p", "relay-cabi"]
6050
if not DEBUG_BUILD:
@@ -109,29 +99,28 @@ def find_dylib():
10999
)
110100

111101

112-
with ignore_pyproject():
113-
setup(
114-
name="sentry-relay",
115-
version=version,
116-
packages=find_packages(),
117-
author="Sentry",
118-
license="FSL-1.0-Apache-2.0",
119-
author_email="[email protected]",
120-
description="A python library to access sentry relay functionality.",
121-
long_description=readme,
122-
long_description_content_type="text/markdown",
123-
include_package_data=True,
124-
package_data={"sentry_relay": ["py.typed", "_lowlevel.pyi"]},
125-
zip_safe=False,
126-
platforms="any",
127-
python_requires=">=3.10",
128-
install_requires=["milksnake>=0.1.6"],
129-
# Specify transitive dependencies manually that are required for the build because
130-
# they are not resolved properly since upgrading to python 3.11 in manylinux.
131-
# milksnake -> cffi -> pycparser
132-
# milksnake specifies cffi>=1.6.0 as dependency while cffi does not specify a
133-
# minimum version for pycparser
134-
setup_requires=["milksnake>=0.1.6", "cffi>=1.6.0", "pycparser"],
135-
milksnake_tasks=[build_native],
136-
cmdclass={"sdist": CustomSDist}, # type: ignore
137-
)
102+
setup(
103+
name="sentry-relay",
104+
version=version,
105+
packages=find_packages(),
106+
author="Sentry",
107+
license="FSL-1.0-Apache-2.0",
108+
author_email="[email protected]",
109+
description="A python library to access sentry relay functionality.",
110+
long_description=readme,
111+
long_description_content_type="text/markdown",
112+
include_package_data=True,
113+
package_data={"sentry_relay": ["py.typed", "_lowlevel.pyi"]},
114+
zip_safe=False,
115+
platforms="any",
116+
python_requires=">=3.10",
117+
install_requires=["milksnake>=0.1.6"],
118+
# Specify transitive dependencies manually that are required for the build because
119+
# they are not resolved properly since upgrading to python 3.11 in manylinux.
120+
# milksnake -> cffi -> pycparser
121+
# milksnake specifies cffi>=1.6.0 as dependency while cffi does not specify a
122+
# minimum version for pycparser
123+
setup_requires=["milksnake>=0.1.6", "cffi>=1.6.0", "pycparser"],
124+
milksnake_tasks=[build_native],
125+
cmdclass={"sdist": CustomSDist}, # type: ignore
126+
)

0 commit comments

Comments
 (0)