Skip to content

Commit

Permalink
move python source in examples under python/ subdir
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhewitt committed Aug 4, 2023
1 parent b67f6ea commit 87a1389
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 7 deletions.
1 change: 1 addition & 0 deletions examples/hello-world-script/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include Cargo.toml
recursive-include src *
recursive-include python *
4 changes: 3 additions & 1 deletion examples/hello-world-script/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from setuptools import setup
from setuptools import find_packages, setup

from setuptools_rust import RustExtension, Binding

setup(
name="hello-world-script",
version="1.0",
packages=find_packages(where="python"),
package_dir={"": "python"},
rust_extensions=[
RustExtension(
{"hello-world-script": "hello_world.hello-world-script"},
Expand Down
1 change: 1 addition & 0 deletions examples/hello-world/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include Cargo.toml
recursive-include src *
recursive-include python *
4 changes: 3 additions & 1 deletion examples/hello-world/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
from setuptools import setup
from setuptools import find_packages, setup

from setuptools_rust import RustBin

setup(
name="hello-world",
version="1.0",
packages=find_packages(where="python"),
package_dir={"": "python"},
rust_extensions=[
RustBin(
"hello-world",
Expand Down
1 change: 1 addition & 0 deletions examples/html-py-ever/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include Cargo.toml
recursive-include src *
recursive-include python *
5 changes: 3 additions & 2 deletions examples/html-py-ever/setup.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env python
import sys

from setuptools import setup
from setuptools import find_packages, setup

from setuptools_rust import RustExtension

setup(
packages=find_packages(where="python"),
package_dir={"": "python"},
rust_extensions=[RustExtension("html_py_ever.html_py_ever")],
)
1 change: 1 addition & 0 deletions examples/namespace_package/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
include Cargo.toml
recursive-include src *
recursive-include python *
3 changes: 2 additions & 1 deletion examples/namespace_package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
setup(
name="namespace_package",
version="0.1.0",
packages=find_namespace_packages(include=["namespace_package.*"]),
packages=find_namespace_packages(include=["namespace_package.*"], where="python"),
package_dir={"": "python"},
zip_safe=False,
rust_extensions=[
RustExtension(
Expand Down
1 change: 1 addition & 0 deletions examples/rust_with_cffi/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include Cargo.toml
include cffi_module.py
recursive-include src *
recursive-include python *
5 changes: 3 additions & 2 deletions examples/rust_with_cffi/setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
from setuptools import setup
from setuptools import find_packages, setup
from setuptools_rust import RustExtension

setup(
Expand All @@ -14,7 +14,8 @@
"Operating System :: POSIX",
"Operating System :: MacOS :: MacOS X",
],
packages=["rust_with_cffi"],
packages=find_packages(where="python"),
package_dir={"": "python"},
rust_extensions=[
RustExtension("rust_with_cffi.rust", py_limited_api="auto"),
],
Expand Down

0 comments on commit 87a1389

Please sign in to comment.