-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python bindings: switch to setuptools
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
- Loading branch information
Showing
7 changed files
with
135 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
/__pycache__/ | ||
/_pathrs* | ||
/dist/ | ||
/*.egg-info/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/__pycache__/ | ||
/_libpathrs_cffi* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/python3 | ||
# libpathrs: safe path resolution on Linux | ||
# Copyright (C) 2019-2024 Aleksa Sarai <cyphar@cyphar.com> | ||
# Copyright (C) 2019-2024 SUSE LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
from ._pathrs import * | ||
|
||
# TODO: Figure out a way to keep this version up-to-date with Cargo.toml. | ||
__version__ = "0.0.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/usr/bin/python3 | ||
# libpathrs: safe path resolution on Linux | ||
# Copyright (C) 2019-2024 Aleksa Sarai <cyphar@cyphar.com> | ||
# Copyright (C) 2019-2024 SUSE LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools>=68", | ||
"wheel", | ||
"cffi>=1.10.0" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "libpathrs" | ||
# TODO: Figure out a way to keep this version up-to-date with Cargo.toml. | ||
version = "0.0.2" | ||
description = "Python bindings for libpathrs, a safe path resolution library for Linux." | ||
keywords = ["libpathrs", "pathrs"] | ||
license = { file = "COPYING.APACHE-2.0" } | ||
authors = [ | ||
{name = "Aleksa Sarai", email = "cyphar@cyphar.com"}, | ||
] | ||
maintainers = [ | ||
{name = "Aleksa Sarai", email = "cyphar@cyphar.com"}, | ||
] | ||
classifiers = [ | ||
"Topic :: Security", | ||
"Topic :: System :: Filesystems", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
|
||
requires-python = ">= 3.8" | ||
dependencies = [ | ||
"cffi>=1.10.0" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/openSUSE/libpathrs" | ||
Repository = "https://github.com/openSUSE/libpathrs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/python3 | ||
# libpathrs: safe path resolution on Linux | ||
# Copyright (C) 2019-2024 Aleksa Sarai <cyphar@cyphar.com> | ||
# Copyright (C) 2019-2024 SUSE LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import setuptools | ||
|
||
setuptools.setup( | ||
ext_package="pathrs", | ||
platforms=["Linux"], | ||
cffi_modules=["pathrs/pathrs_build.py:ffibuilder"], | ||
) |