Skip to content

Commit

Permalink
Migrate examples to src-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysle committed Nov 29, 2023
1 parent b0a98d0 commit c255b01
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 9 deletions.
5 changes: 3 additions & 2 deletions native/pkg_a/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
author_email='[email protected]',

license='Apache Software License',

packages=['example_pkg.a'],
# This example uses automatic discovery. You can also implement custom discovery like this:
# packages=find_namespace_packages(where='src', include=['example_pkg.a']),
# package_dir={'': 'src'},
zip_safe=False,
)
File renamed without changes.
5 changes: 3 additions & 2 deletions native/pkg_b/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
author_email='[email protected]',

license='Apache Software License',

packages=['example_pkg.b'],
# This example uses automatic discovery. You can also implement custom discovery like this:
# packages=find_namespace_packages(where='src', include=['example_pkg.b']),
# package_dir={'': 'src'},
zip_safe=False,
)
File renamed without changes.
3 changes: 2 additions & 1 deletion pkg_resources/pkg_a/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

license='Apache Software License',

packages=find_packages(),
packages=find_packages(where='src'),
namespace_packages=['example_pkg'],
package_dir={'': 'src'},
zip_safe=False,
)
File renamed without changes.
3 changes: 2 additions & 1 deletion pkg_resources/pkg_b/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@

license='Apache Software License',

packages=find_packages(),
packages=find_packages(where='src'),
namespace_packages=['example_pkg'],
package_dir={'': 'src'},
zip_safe=False,
)
File renamed without changes.
2 changes: 1 addition & 1 deletion pkgutil/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ cd pkgutil/pkg_a
pip install .

# Test the install by printing the `name` from the `__init__.py` file.
python -c "import example_pkg.a as a; print a.name"
python -c "import example_pkg.a as a; print(a.name)"
```
3 changes: 2 additions & 1 deletion pkgutil/pkg_a/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

license='Apache Software License',

packages=find_packages(),
packages=find_packages(where='src'),
package_dir={'': 'src'},
zip_safe=False,
)
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion pkgutil/pkg_b/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

license='Apache Software License',

packages=find_packages(),
packages=find_packages(where='src'),
package_dir={'': 'src'},
zip_safe=False,
)
File renamed without changes.
File renamed without changes.

0 comments on commit c255b01

Please sign in to comment.