diff --git a/.coveragerc b/.coveragerc index 6d6e76a8dd..1f39673284 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,8 +1,15 @@ [run] branch = True -source = src/core/toga +source_pkgs = toga omit = - src/core/toga/**/__init__.py + **/__init__.py + +[paths] +# Paths which may contain the packages listed in source_pkgs. The first path will be used +# to generate the filenames in the report. +source = + src/core/src + **/site-packages [report] show_missing = True diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d29f8491b3..8d9c015d13 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,72 +4,64 @@ on: push: branches: - main + workflow_call: + +env: + min_python_version: "3.7" + +defaults: + run: + shell: bash jobs: beefore: name: Pre-test checks runs-on: ubuntu-latest strategy: - max-parallel: 4 matrix: task: - flake8 # - towncrier-check - docs - - package steps: - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 + - uses: actions/setup-python@v3.1.2 with: - python-version: "3.7" + python-version: ${{ env.min_python_version }} - name: Install dependencies run: | python -m pip install --upgrade pip python -m pip install --upgrade setuptools python -m pip install tox - - name: Run pre-test checks - run: | - tox -e ${{ matrix.task }} + - run: tox -e ${{ matrix.task }} - smoke: - name: Smoke test (3.7) - needs: - - beefore + package: + needs: beefore runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 + - uses: actions/setup-python@v3.1.2 with: - python-version: "3.7" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install --upgrade tox - - name: Test - run: | - tox -e py - - name: Check coverage - uses: codecov/codecov-action@v1 + python-version: ${{ env.min_python_version }} + - run: pip install tox + - run: tox -e package + - name: Collect packages + run: | + mkdir packages + mv {.,demo,src/*}/dist/* packages + - uses: actions/upload-artifact@v3 with: - token: ${{ secrets.CODECOV_TOKEN }} - file: ./coverage.xml - flags: unittests - fail_ci_if_error: true + name: packages + path: packages + if-no-files-found: error - python-versions: - # Only run this and subsequent steps on branches. - # `github.head_ref` only exists on pull requests. - if: github.head_ref - name: Python compatibility test - needs: smoke - runs-on: ubuntu-latest + core: + needs: package strategy: - max-parallel: 4 matrix: - python-version: ["3.8", "3.9", "3.10", "3.11.0-alpha - 3.11.0"] + platform: ['macos', 'ubuntu', 'windows'] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11.0-alpha - 3.11.0"] + runs-on: ${{ matrix.platform }}-latest steps: - uses: actions/checkout@v1 - name: Set up Python ${{ matrix.python-version }} @@ -81,152 +73,68 @@ jobs: python -m pip install --upgrade pip python -m pip install --upgrade setuptools python -m pip install --upgrade tox + - name: Get packages + uses: actions/download-artifact@v3 + with: + name: packages + path: packages - name: Test + env: + TOGA_INSTALL_COMMAND: 'bash -c "pip install packages/toga_{core,dummy}*.whl"' run: | tox -e py + - if: matrix.platform == 'ubuntu' && matrix.python-version == env.min_python_version + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml + flags: unittests + fail_ci_if_error: true - windows: - name: Winforms backend tests - needs: python-versions - runs-on: windows-latest + backend: + needs: package + strategy: + matrix: + backend: [android, cocoa, gtk, iOS, web, winforms] + include: + - runs-on: ubuntu-latest + - python-version: "3.7" # Should be env.min_python_version (https://github.com/actions/runner/issues/480) + - pre-command: + - test-command: pytest + - backend: cocoa + runs-on: macos-latest + - backend: gtk + pre-command: "sudo apt-get update -y && sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config" + test-command: "xvfb-run -a -s '-screen 0 2048x1536x24' pytest" + - backend: iOS + runs-on: macos-latest + - backend: winforms + runs-on: windows-latest + # Py3.9 is the first Python version for which + # a wheel of pythonnet isn't available on PyPI. + python-version: "3.9" + runs-on: ${{ matrix.runs-on }} steps: - uses: actions/checkout@v1 - - name: Set up Python 3.9 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3.1.2 with: # Py3.9 is the first Python version for which # a wheel of pythonnet isn't available on PyPI. - python-version: "3.9" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install pytest-tldr - python -m pip install -e src/core - python -m pip install -e src/dummy - python -m pip install -e src/winforms - - name: Test - run: | - cd src/winforms - pytest - - name: Core Test - run: | - cd src/core - pytest - - macOS: - name: macOS backend tests - needs: python-versions - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 - with: - python-version: "3.7" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install pytest-tldr - python -m pip install -e src/core - python -m pip install -e src/dummy - python -m pip install -e src/cocoa - - name: Test - run: | - cd src/cocoa - pytest - - iOS: - name: iOS backend tests - needs: python-versions - runs-on: macOS-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 - with: - python-version: "3.7" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install pytest-tldr - python -m pip install -e src/core - python -m pip install -e src/dummy - python -m pip install -e src/iOS - - name: Test - run: | - cd src/iOS - pytest - - gtk: - name: GTK+ backend tests - needs: python-versions - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 - with: - python-version: "3.7" - - name: Install dependencies - run: | - sudo apt-get update -y - sudo apt-get install -y python3-gi python3-gi-cairo gir1.2-gtk-3.0 python3-dev libgirepository1.0-dev libcairo2-dev pkg-config - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install pytest-tldr - python -m pip install -e src/core - python -m pip install -e src/dummy - python -m pip install -e src/gtk - - name: Test - run: | - cd src/gtk - xvfb-run -a -s '-screen 0 2048x1536x24' pytest - - android: - name: Android backend tests - needs: python-versions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 - with: - python-version: "3.7" - - name: Install dependencies - run: | - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools - python -m pip install pytest-tldr - python -m pip install -e src/core - python -m pip install -e src/dummy - python -m pip install -e src/android - - name: Test - run: | - cd src/android - pytest - - web: - name: Web backend tests - needs: python-versions - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Set up Python 3.7 - uses: actions/setup-python@v3.1.2 + python-version: ${{ matrix.python-version }} + - name: Get packages + uses: actions/download-artifact@v3 with: - python-version: "3.7" + name: packages + path: packages - name: Install dependencies run: | + ${{ matrix.pre-command }} python -m pip install --upgrade pip python -m pip install --upgrade setuptools python -m pip install pytest-tldr - python -m pip install -e src/core - python -m pip install -e src/dummy - python -m pip install -e src/web + python -m pip install packages/toga_{core,dummy,${{ matrix.backend }}}*.whl - name: Test run: | - cd src/web - pytest + cd src/${{ matrix.backend }} + ${{ matrix.test-command }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..96b852050f --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Upload Python Package + +on: + release: + types: published + +jobs: + deploy: + strategy: + matrix: + package: ["toga", "toga_android", "toga_cocoa", "toga_core", "toga_demo", + "toga_dummy", "toga_gtk", "toga_iOS", "toga_web", "toga_winforms"] + runs-on: ubuntu-latest + steps: + - name: Get packages + uses: dsaltares/fetch-gh-release-asset@1.0.0 + with: + version: tags/${{ github.event.release.tag_name }} + file: ${{ github.event.repository.name }}.* + regex: true + target: packages/ + - name: Extract ${{ matrix.package }} + run: | + mkdir dist + mv packages/$(echo ${{ matrix.package }} | sed 's/_/?/')-[0-9]* dist + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets[format('PYPI_PASSWORD_{0}', matrix.package)] }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..b6a92cb3a0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,55 @@ +name: Create Release + +on: + push: + tags: + - 'v*' + +jobs: + ci: + uses: ./.github/workflows/ci.yml + + release: + name: Create GitHub release + needs: ci + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Set build variables + run: | + echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV + - name: Get packages + uses: actions/download-artifact@v3 + with: + name: packages + path: packages + - uses: ncipollo/release-action@v1.11.1 + with: + name: ${{ env.VERSION }} + draft: true + artifacts: "packages/*" + artifactErrorsFailBuild: true + + deploy-test: + needs: release + strategy: + matrix: + package: ["toga", "toga_android", "toga_cocoa", "toga_core", "toga_demo", + "toga_dummy", "toga_gtk", "toga_iOS", "toga_web", "toga_winforms"] + runs-on: ubuntu-latest + steps: + - name: Get packages + uses: actions/download-artifact@v3 + with: + name: packages + path: packages + - name: Extract ${{ matrix.package }} + run: | + mkdir dist + mv packages/$(echo ${{ matrix.package }} | sed 's/_/?/')-[0-9]* dist + - name: Publish to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository_url: https://test.pypi.org/legacy/ + password: ${{ secrets[format('TEST_PYPI_PASSWORD_{0}', matrix.package)] }} diff --git a/MANIFEST.in b/MANIFEST.in index 08ebbda00a..7429ee89ed 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -38,9 +38,15 @@ recursive-include examples *.css recursive-include examples *.html recursive-include examples README prune examples/*/.vscode +prune examples/*/android +prune examples/*/cocoa +prune examples/*/gtk +prune examples/*/iOS +prune examples/*/web +prune examples/*/winforms -include src/winforms/toga_winforms/libs/WebView2/LICENSE.md -include src/winforms/toga_winforms/libs/WebView2/README.md +include src/winforms/src/toga_winforms/libs/WebView2/LICENSE.md +include src/winforms/src/toga_winforms/libs/WebView2/README.md recursive-include src *.css recursive-include src *.html recursive-include src *.icns @@ -52,7 +58,7 @@ recursive-include src *.rst recursive-include src CONTRIBUTING.md recursive-include src LICENSE recursive-include src MANIFEST.in -recursive-include src/winforms/toga_winforms/libs/WebView2 *.dll +recursive-include src/winforms/src/toga_winforms/libs/WebView2 *.dll prune src/*/build prune src/*/.eggs diff --git a/docs/background/architecture.rst b/docs/background/architecture.rst index 87f33ecf0e..208ef27bb7 100644 --- a/docs/background/architecture.rst +++ b/docs/background/architecture.rst @@ -91,7 +91,7 @@ An example Here's how Toga's three-layer API works on the Button widget. -* ``toga.Button`` is defined in ``src/core/toga/widgets/button.py``. This +* ``toga.Button`` is defined in ``src/core/src/toga/widgets/button.py``. This defines the public interface for the Button widget, describing (amongst other things) that there is an ``on_click`` event handler on a Button. It expects that there will be *an* implementation, but doesn't care which implementation diff --git a/docs/conf.py b/docs/conf.py index ab844ceab0..9202b1bfed 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -18,7 +18,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -sys.path.insert(0, os.path.abspath('../src/core/')) +sys.path.insert(0, os.path.abspath('../src/core/src')) # -- General configuration ----------------------------------------------------- @@ -49,7 +49,7 @@ # built documents. # # The full version, including alpha/beta/rc tags. -with open('../src/core/toga/__init__.py', encoding='utf8') as version_file: +with open('../src/core/src/toga/__init__.py', encoding='utf8') as version_file: version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M) if version_match: release = version_match.group(1) diff --git a/docs/how-to/index.rst b/docs/how-to/index.rst index 28a0c9e369..765ccc73a9 100644 --- a/docs/how-to/index.rst +++ b/docs/how-to/index.rst @@ -10,3 +10,4 @@ How-to Guides Get started Contribute to Toga + Cut a Toga release diff --git a/docs/how-to/release.rst b/docs/how-to/release.rst new file mode 100644 index 0000000000..0a916c054e --- /dev/null +++ b/docs/how-to/release.rst @@ -0,0 +1,82 @@ +============================== +How to cut a Toga release +============================== + +The release infrastructure for Toga is semi-automated, using GitHub +Actions to formally publish releases. + +This guide assumes that you have an ``upstream`` remote configured on your +local clone of the Toga repository, pointing at the official repository. +If all you have is a checkout of a personal fork of the Toga repository, +you can configure that checkout by running:: + + $ git remote add upstream https://github.com/beeware/toga.git + +The procedure for cutting a new release is as follows: + +#. Check the contents of the upstream repository's main branch:: + + $ git fetch upstream + $ git checkout --detach upstream/main + + Check that the HEAD of release now matches upstream/main. + +#. If necessary, update the version number:: + + $ ./release.sh bump 1.2.3 + +#. Tag the release, and push the branch and tag upstream:: + + $ git tag v1.2.3 + $ git push upstream main + $ git push upstream v1.2.3 + +#. Pushing the tag will start a workflow to create a draft release on GitHub. + You can `follow the progress of the workflow on GitHub + `__; + once the workflow completes, there should be a new `draft release + `__, and entries on the TestPyPI + server for `toga-core `__, + `toga-cocoa `__, etc. + + Confirm that this action successfully completes. If it fails, there's a + couple of possible causes: + + a. The final upload to TestPyPI failed. TestPyPI doesn't have the same + service monitoring as PyPI-proper, so it sometimes has problems. However, + it's not critical to the release process. + b. Something else fails in the build process. If the problem can be fixed + without a code change to the Toga repository (e.g., a transient + problem with build machines not being available), you can re-run the + action that failed through the Github Actions GUI. If the fix requires a + code change, delete the old tag, make the code change, and re-tag the + release. + +#. Download the "packages" artifact from the GitHub workflow, and use its wheels + to build some apps and perform any pre-release testing that may be appropriate. + +#. Log into ReadTheDocs, visit the `Versions tab + `__, and activate the + new version. Ensure that the build completes; if there's a problem, you + may need to correct the build configuration, roll back and re-tag the release. + +#. Edit the GitHub release. Add release notes. Check the pre-release checkbox if + necessary. + +#. Double check everything, then click Publish. This will trigger a + `publication workflow on GitHub + `__. + +#. Wait for the packages to appear on PyPI (`toga-core + `__, `toga-cocoa + `__, etc.). + +#. Set the version number for the next release:: + + $ ./release.sh bump 1.2.4 + +Congratulations, you've just published a release! + +Once the release has successfully appeared on PyPI or TestPyPI, it cannot be +changed. If you spot a problem after that point, you'll need to restart with +a new version number. diff --git a/release.sh b/release.sh index f3d70a1315..7fec854977 100755 --- a/release.sh +++ b/release.sh @@ -34,9 +34,9 @@ function bump { else if [ "$1" = "core" ]; then - pushd src/$1/toga + pushd src/$1/src/toga else - pushd src/$1/toga_$1 + pushd src/$1/src/toga_$1 fi mv __init__.py temp @@ -90,31 +90,13 @@ function install { fi } -function release { - echo - echo "************************************************************" - echo "RELEASE $1 version $2" - echo "************************************************************" - echo - if [ "$1" = "toga" ]; then - twine upload "dist/toga-$2-py3-none-any.whl" - twine upload "dist/toga-$2.tar.gz" - elif [ "$1" = "demo" ]; then - twine upload "demo/dist/toga_demo-$2-py3-none-any.whl" - twine upload "demo/dist/toga-demo-$2.tar.gz" - else - twine upload "src/$1/dist/toga_$1-$2-py3-none-any.whl" - twine upload "src/$1/dist/toga-$1-$2.tar.gz" - fi -} - MODULES="android cocoa core dummy gtk iOS web winforms toga demo" action=$1 shift -VERSION=$(grep "^__version__ = '.*'$" src/core/toga/__init__.py | cut -f 2 -d \') +VERSION=$(grep "^__version__ = '.*'$" src/core/src/toga/__init__.py | cut -f 2 -d \') if [ "$action" = "" ]; then echo "Usage -" @@ -146,16 +128,6 @@ elif [ "$action" = "test" ]; then install $module done -elif [ "$action" = "release" ]; then - - for module in $MODULES; do - $action $module $VERSION - done - - git tag v$VERSION - git push upstream release:main - git push --tags upstream release:main - elif [ "$action" = "bump" ]; then version=$1 shift diff --git a/setup.py b/setup.py index bf9d444e1e..f8ab2243a0 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga to compute the version; # and to support versioned extra dependencies -with open('src/core/toga/__init__.py', encoding='utf8') as version_file: +with open('src/core/src/toga/__init__.py', encoding='utf8') as version_file: version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M) if version_match: version = version_match.group(1) diff --git a/src/android/MANIFEST.in b/src/android/MANIFEST.in index 5fdb894d07..ecd14299d5 100644 --- a/src/android/MANIFEST.in +++ b/src/android/MANIFEST.in @@ -2,4 +2,3 @@ include CONTRIBUTING.md include LICENSE include README.rst recursive-include tests *.py -recursive-include toga_android *.py diff --git a/src/android/setup.cfg b/src/android/setup.cfg index 098f6a227b..2ee5bfc536 100644 --- a/src/android/setup.cfg +++ b/src/android/setup.cfg @@ -38,15 +38,11 @@ keywords = android [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -[options.packages.find] -include = - toga_android - toga_android.* - [flake8] exclude=\ .eggs/*,\ diff --git a/src/android/setup.py b/src/android/setup.py index 1069e47ced..9bbf5714af 100644 --- a/src/android/setup.py +++ b/src/android/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_android to compute the version; # and to support versioned subpackage dependencies -with open('toga_android/__init__.py', encoding='utf8') as version_file: +with open('src/toga_android/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/android/toga_android/__init__.py b/src/android/src/toga_android/__init__.py similarity index 100% rename from src/android/toga_android/__init__.py rename to src/android/src/toga_android/__init__.py diff --git a/src/android/toga_android/app.py b/src/android/src/toga_android/app.py similarity index 100% rename from src/android/toga_android/app.py rename to src/android/src/toga_android/app.py diff --git a/src/android/toga_android/colors.py b/src/android/src/toga_android/colors.py similarity index 100% rename from src/android/toga_android/colors.py rename to src/android/src/toga_android/colors.py diff --git a/src/android/toga_android/command.py b/src/android/src/toga_android/command.py similarity index 100% rename from src/android/toga_android/command.py rename to src/android/src/toga_android/command.py diff --git a/src/android/toga_android/dialogs.py b/src/android/src/toga_android/dialogs.py similarity index 100% rename from src/android/toga_android/dialogs.py rename to src/android/src/toga_android/dialogs.py diff --git a/src/android/toga_android/factory.py b/src/android/src/toga_android/factory.py similarity index 100% rename from src/android/toga_android/factory.py rename to src/android/src/toga_android/factory.py diff --git a/src/android/toga_android/fonts.py b/src/android/src/toga_android/fonts.py similarity index 100% rename from src/android/toga_android/fonts.py rename to src/android/src/toga_android/fonts.py diff --git a/src/android/toga_android/hardware/__init__.py b/src/android/src/toga_android/hardware/__init__.py similarity index 100% rename from src/android/toga_android/hardware/__init__.py rename to src/android/src/toga_android/hardware/__init__.py diff --git a/src/android/toga_android/icons.py b/src/android/src/toga_android/icons.py similarity index 100% rename from src/android/toga_android/icons.py rename to src/android/src/toga_android/icons.py diff --git a/src/android/toga_android/images.py b/src/android/src/toga_android/images.py similarity index 100% rename from src/android/toga_android/images.py rename to src/android/src/toga_android/images.py diff --git a/src/android/toga_android/libs/__init__.py b/src/android/src/toga_android/libs/__init__.py similarity index 100% rename from src/android/toga_android/libs/__init__.py rename to src/android/src/toga_android/libs/__init__.py diff --git a/src/android/toga_android/libs/activity.py b/src/android/src/toga_android/libs/activity.py similarity index 100% rename from src/android/toga_android/libs/activity.py rename to src/android/src/toga_android/libs/activity.py diff --git a/src/android/toga_android/libs/android/__init__.py b/src/android/src/toga_android/libs/android/__init__.py similarity index 100% rename from src/android/toga_android/libs/android/__init__.py rename to src/android/src/toga_android/libs/android/__init__.py diff --git a/src/android/toga_android/libs/android/app.py b/src/android/src/toga_android/libs/android/app.py similarity index 100% rename from src/android/toga_android/libs/android/app.py rename to src/android/src/toga_android/libs/android/app.py diff --git a/src/android/toga_android/libs/android/content.py b/src/android/src/toga_android/libs/android/content.py similarity index 100% rename from src/android/toga_android/libs/android/content.py rename to src/android/src/toga_android/libs/android/content.py diff --git a/src/android/toga_android/libs/android/graphics.py b/src/android/src/toga_android/libs/android/graphics.py similarity index 100% rename from src/android/toga_android/libs/android/graphics.py rename to src/android/src/toga_android/libs/android/graphics.py diff --git a/src/android/toga_android/libs/android/text.py b/src/android/src/toga_android/libs/android/text.py similarity index 100% rename from src/android/toga_android/libs/android/text.py rename to src/android/src/toga_android/libs/android/text.py diff --git a/src/android/toga_android/libs/android/util.py b/src/android/src/toga_android/libs/android/util.py similarity index 100% rename from src/android/toga_android/libs/android/util.py rename to src/android/src/toga_android/libs/android/util.py diff --git a/src/android/toga_android/libs/android/view.py b/src/android/src/toga_android/libs/android/view.py similarity index 100% rename from src/android/toga_android/libs/android/view.py rename to src/android/src/toga_android/libs/android/view.py diff --git a/src/android/toga_android/libs/android/webkit.py b/src/android/src/toga_android/libs/android/webkit.py similarity index 100% rename from src/android/toga_android/libs/android/webkit.py rename to src/android/src/toga_android/libs/android/webkit.py diff --git a/src/android/toga_android/libs/android/widget.py b/src/android/src/toga_android/libs/android/widget.py similarity index 100% rename from src/android/toga_android/libs/android/widget.py rename to src/android/src/toga_android/libs/android/widget.py diff --git a/src/android/toga_android/libs/androidx/__init__.py b/src/android/src/toga_android/libs/androidx/__init__.py similarity index 100% rename from src/android/toga_android/libs/androidx/__init__.py rename to src/android/src/toga_android/libs/androidx/__init__.py diff --git a/src/android/toga_android/libs/androidx/swiperefreshlayout.py b/src/android/src/toga_android/libs/androidx/swiperefreshlayout.py similarity index 100% rename from src/android/toga_android/libs/androidx/swiperefreshlayout.py rename to src/android/src/toga_android/libs/androidx/swiperefreshlayout.py diff --git a/src/android/toga_android/paths.py b/src/android/src/toga_android/paths.py similarity index 100% rename from src/android/toga_android/paths.py rename to src/android/src/toga_android/paths.py diff --git a/src/android/toga_android/widgets/__init__.py b/src/android/src/toga_android/widgets/__init__.py similarity index 100% rename from src/android/toga_android/widgets/__init__.py rename to src/android/src/toga_android/widgets/__init__.py diff --git a/src/android/toga_android/widgets/base.py b/src/android/src/toga_android/widgets/base.py similarity index 100% rename from src/android/toga_android/widgets/base.py rename to src/android/src/toga_android/widgets/base.py diff --git a/src/android/toga_android/widgets/box.py b/src/android/src/toga_android/widgets/box.py similarity index 100% rename from src/android/toga_android/widgets/box.py rename to src/android/src/toga_android/widgets/box.py diff --git a/src/android/toga_android/widgets/button.py b/src/android/src/toga_android/widgets/button.py similarity index 100% rename from src/android/toga_android/widgets/button.py rename to src/android/src/toga_android/widgets/button.py diff --git a/src/android/toga_android/widgets/canvas.py b/src/android/src/toga_android/widgets/canvas.py similarity index 100% rename from src/android/toga_android/widgets/canvas.py rename to src/android/src/toga_android/widgets/canvas.py diff --git a/src/android/toga_android/widgets/datepicker.py b/src/android/src/toga_android/widgets/datepicker.py similarity index 100% rename from src/android/toga_android/widgets/datepicker.py rename to src/android/src/toga_android/widgets/datepicker.py diff --git a/src/android/toga_android/widgets/detailedlist.py b/src/android/src/toga_android/widgets/detailedlist.py similarity index 100% rename from src/android/toga_android/widgets/detailedlist.py rename to src/android/src/toga_android/widgets/detailedlist.py diff --git a/src/android/toga_android/widgets/imageview.py b/src/android/src/toga_android/widgets/imageview.py similarity index 100% rename from src/android/toga_android/widgets/imageview.py rename to src/android/src/toga_android/widgets/imageview.py diff --git a/src/android/toga_android/widgets/internal/__init__.py b/src/android/src/toga_android/widgets/internal/__init__.py similarity index 100% rename from src/android/toga_android/widgets/internal/__init__.py rename to src/android/src/toga_android/widgets/internal/__init__.py diff --git a/src/android/toga_android/widgets/internal/pickers.py b/src/android/src/toga_android/widgets/internal/pickers.py similarity index 100% rename from src/android/toga_android/widgets/internal/pickers.py rename to src/android/src/toga_android/widgets/internal/pickers.py diff --git a/src/android/toga_android/widgets/label.py b/src/android/src/toga_android/widgets/label.py similarity index 100% rename from src/android/toga_android/widgets/label.py rename to src/android/src/toga_android/widgets/label.py diff --git a/src/android/toga_android/widgets/multilinetextinput.py b/src/android/src/toga_android/widgets/multilinetextinput.py similarity index 100% rename from src/android/toga_android/widgets/multilinetextinput.py rename to src/android/src/toga_android/widgets/multilinetextinput.py diff --git a/src/android/toga_android/widgets/numberinput.py b/src/android/src/toga_android/widgets/numberinput.py similarity index 100% rename from src/android/toga_android/widgets/numberinput.py rename to src/android/src/toga_android/widgets/numberinput.py diff --git a/src/android/toga_android/widgets/passwordinput.py b/src/android/src/toga_android/widgets/passwordinput.py similarity index 100% rename from src/android/toga_android/widgets/passwordinput.py rename to src/android/src/toga_android/widgets/passwordinput.py diff --git a/src/android/toga_android/widgets/progressbar.py b/src/android/src/toga_android/widgets/progressbar.py similarity index 100% rename from src/android/toga_android/widgets/progressbar.py rename to src/android/src/toga_android/widgets/progressbar.py diff --git a/src/android/toga_android/widgets/scrollcontainer.py b/src/android/src/toga_android/widgets/scrollcontainer.py similarity index 100% rename from src/android/toga_android/widgets/scrollcontainer.py rename to src/android/src/toga_android/widgets/scrollcontainer.py diff --git a/src/android/toga_android/widgets/selection.py b/src/android/src/toga_android/widgets/selection.py similarity index 100% rename from src/android/toga_android/widgets/selection.py rename to src/android/src/toga_android/widgets/selection.py diff --git a/src/android/toga_android/widgets/slider.py b/src/android/src/toga_android/widgets/slider.py similarity index 100% rename from src/android/toga_android/widgets/slider.py rename to src/android/src/toga_android/widgets/slider.py diff --git a/src/android/toga_android/widgets/switch.py b/src/android/src/toga_android/widgets/switch.py similarity index 100% rename from src/android/toga_android/widgets/switch.py rename to src/android/src/toga_android/widgets/switch.py diff --git a/src/android/toga_android/widgets/table.py b/src/android/src/toga_android/widgets/table.py similarity index 100% rename from src/android/toga_android/widgets/table.py rename to src/android/src/toga_android/widgets/table.py diff --git a/src/android/toga_android/widgets/textinput.py b/src/android/src/toga_android/widgets/textinput.py similarity index 100% rename from src/android/toga_android/widgets/textinput.py rename to src/android/src/toga_android/widgets/textinput.py diff --git a/src/android/toga_android/widgets/timepicker.py b/src/android/src/toga_android/widgets/timepicker.py similarity index 100% rename from src/android/toga_android/widgets/timepicker.py rename to src/android/src/toga_android/widgets/timepicker.py diff --git a/src/android/toga_android/widgets/webview.py b/src/android/src/toga_android/widgets/webview.py similarity index 100% rename from src/android/toga_android/widgets/webview.py rename to src/android/src/toga_android/widgets/webview.py diff --git a/src/android/toga_android/window.py b/src/android/src/toga_android/window.py similarity index 100% rename from src/android/toga_android/window.py rename to src/android/src/toga_android/window.py diff --git a/src/cocoa/MANIFEST.in b/src/cocoa/MANIFEST.in index 6679b99f5d..ecd14299d5 100644 --- a/src/cocoa/MANIFEST.in +++ b/src/cocoa/MANIFEST.in @@ -2,4 +2,3 @@ include CONTRIBUTING.md include LICENSE include README.rst recursive-include tests *.py -recursive-include toga_cocoa *.py diff --git a/src/cocoa/setup.cfg b/src/cocoa/setup.cfg index 481ec7d701..96d19fb20c 100644 --- a/src/cocoa/setup.cfg +++ b/src/cocoa/setup.cfg @@ -39,15 +39,11 @@ keywords = cocoa [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -[options.packages.find] -include = - toga_cocoa - toga_cocoa.* - [flake8] exclude=\ .eggs/*,\ diff --git a/src/cocoa/setup.py b/src/cocoa/setup.py index e8bbf2e2ce..6e4ffa18a2 100644 --- a/src/cocoa/setup.py +++ b/src/cocoa/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_cocoa to compute the version; # and to support versioned subpackage dependencies -with open('toga_cocoa/__init__.py', encoding='utf8') as version_file: +with open('src/toga_cocoa/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/cocoa/toga_cocoa/__init__.py b/src/cocoa/src/toga_cocoa/__init__.py similarity index 100% rename from src/cocoa/toga_cocoa/__init__.py rename to src/cocoa/src/toga_cocoa/__init__.py diff --git a/src/cocoa/toga_cocoa/app.py b/src/cocoa/src/toga_cocoa/app.py similarity index 100% rename from src/cocoa/toga_cocoa/app.py rename to src/cocoa/src/toga_cocoa/app.py diff --git a/src/cocoa/toga_cocoa/colors.py b/src/cocoa/src/toga_cocoa/colors.py similarity index 100% rename from src/cocoa/toga_cocoa/colors.py rename to src/cocoa/src/toga_cocoa/colors.py diff --git a/src/cocoa/toga_cocoa/command.py b/src/cocoa/src/toga_cocoa/command.py similarity index 100% rename from src/cocoa/toga_cocoa/command.py rename to src/cocoa/src/toga_cocoa/command.py diff --git a/src/cocoa/toga_cocoa/constraints.py b/src/cocoa/src/toga_cocoa/constraints.py similarity index 100% rename from src/cocoa/toga_cocoa/constraints.py rename to src/cocoa/src/toga_cocoa/constraints.py diff --git a/src/cocoa/toga_cocoa/dialogs.py b/src/cocoa/src/toga_cocoa/dialogs.py similarity index 100% rename from src/cocoa/toga_cocoa/dialogs.py rename to src/cocoa/src/toga_cocoa/dialogs.py diff --git a/src/cocoa/toga_cocoa/documents.py b/src/cocoa/src/toga_cocoa/documents.py similarity index 100% rename from src/cocoa/toga_cocoa/documents.py rename to src/cocoa/src/toga_cocoa/documents.py diff --git a/src/cocoa/toga_cocoa/factory.py b/src/cocoa/src/toga_cocoa/factory.py similarity index 100% rename from src/cocoa/toga_cocoa/factory.py rename to src/cocoa/src/toga_cocoa/factory.py diff --git a/src/cocoa/toga_cocoa/fonts.py b/src/cocoa/src/toga_cocoa/fonts.py similarity index 100% rename from src/cocoa/toga_cocoa/fonts.py rename to src/cocoa/src/toga_cocoa/fonts.py diff --git a/src/cocoa/toga_cocoa/hardware/__init__.py b/src/cocoa/src/toga_cocoa/hardware/__init__.py similarity index 100% rename from src/cocoa/toga_cocoa/hardware/__init__.py rename to src/cocoa/src/toga_cocoa/hardware/__init__.py diff --git a/src/cocoa/toga_cocoa/icons.py b/src/cocoa/src/toga_cocoa/icons.py similarity index 100% rename from src/cocoa/toga_cocoa/icons.py rename to src/cocoa/src/toga_cocoa/icons.py diff --git a/src/cocoa/toga_cocoa/images.py b/src/cocoa/src/toga_cocoa/images.py similarity index 100% rename from src/cocoa/toga_cocoa/images.py rename to src/cocoa/src/toga_cocoa/images.py diff --git a/src/cocoa/toga_cocoa/keys.py b/src/cocoa/src/toga_cocoa/keys.py similarity index 100% rename from src/cocoa/toga_cocoa/keys.py rename to src/cocoa/src/toga_cocoa/keys.py diff --git a/src/cocoa/toga_cocoa/libs/__init__.py b/src/cocoa/src/toga_cocoa/libs/__init__.py similarity index 100% rename from src/cocoa/toga_cocoa/libs/__init__.py rename to src/cocoa/src/toga_cocoa/libs/__init__.py diff --git a/src/cocoa/toga_cocoa/libs/appkit.py b/src/cocoa/src/toga_cocoa/libs/appkit.py similarity index 100% rename from src/cocoa/toga_cocoa/libs/appkit.py rename to src/cocoa/src/toga_cocoa/libs/appkit.py diff --git a/src/cocoa/toga_cocoa/libs/core_graphics.py b/src/cocoa/src/toga_cocoa/libs/core_graphics.py similarity index 100% rename from src/cocoa/toga_cocoa/libs/core_graphics.py rename to src/cocoa/src/toga_cocoa/libs/core_graphics.py diff --git a/src/cocoa/toga_cocoa/libs/core_text.py b/src/cocoa/src/toga_cocoa/libs/core_text.py similarity index 100% rename from src/cocoa/toga_cocoa/libs/core_text.py rename to src/cocoa/src/toga_cocoa/libs/core_text.py diff --git a/src/cocoa/toga_cocoa/libs/foundation.py b/src/cocoa/src/toga_cocoa/libs/foundation.py similarity index 100% rename from src/cocoa/toga_cocoa/libs/foundation.py rename to src/cocoa/src/toga_cocoa/libs/foundation.py diff --git a/src/cocoa/toga_cocoa/libs/webkit.py b/src/cocoa/src/toga_cocoa/libs/webkit.py similarity index 100% rename from src/cocoa/toga_cocoa/libs/webkit.py rename to src/cocoa/src/toga_cocoa/libs/webkit.py diff --git a/src/cocoa/toga_cocoa/paths.py b/src/cocoa/src/toga_cocoa/paths.py similarity index 100% rename from src/cocoa/toga_cocoa/paths.py rename to src/cocoa/src/toga_cocoa/paths.py diff --git a/src/cocoa/toga_cocoa/resources/__init__.py b/src/cocoa/src/toga_cocoa/resources/__init__.py similarity index 100% rename from src/cocoa/toga_cocoa/resources/__init__.py rename to src/cocoa/src/toga_cocoa/resources/__init__.py diff --git a/src/cocoa/toga_cocoa/widgets/__init__.py b/src/cocoa/src/toga_cocoa/widgets/__init__.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/__init__.py rename to src/cocoa/src/toga_cocoa/widgets/__init__.py diff --git a/src/cocoa/toga_cocoa/widgets/activityindicator.py b/src/cocoa/src/toga_cocoa/widgets/activityindicator.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/activityindicator.py rename to src/cocoa/src/toga_cocoa/widgets/activityindicator.py diff --git a/src/cocoa/toga_cocoa/widgets/base.py b/src/cocoa/src/toga_cocoa/widgets/base.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/base.py rename to src/cocoa/src/toga_cocoa/widgets/base.py diff --git a/src/cocoa/toga_cocoa/widgets/box.py b/src/cocoa/src/toga_cocoa/widgets/box.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/box.py rename to src/cocoa/src/toga_cocoa/widgets/box.py diff --git a/src/cocoa/toga_cocoa/widgets/button.py b/src/cocoa/src/toga_cocoa/widgets/button.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/button.py rename to src/cocoa/src/toga_cocoa/widgets/button.py diff --git a/src/cocoa/toga_cocoa/widgets/canvas.py b/src/cocoa/src/toga_cocoa/widgets/canvas.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/canvas.py rename to src/cocoa/src/toga_cocoa/widgets/canvas.py diff --git a/src/cocoa/toga_cocoa/widgets/detailedlist.py b/src/cocoa/src/toga_cocoa/widgets/detailedlist.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/detailedlist.py rename to src/cocoa/src/toga_cocoa/widgets/detailedlist.py diff --git a/src/cocoa/toga_cocoa/widgets/divider.py b/src/cocoa/src/toga_cocoa/widgets/divider.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/divider.py rename to src/cocoa/src/toga_cocoa/widgets/divider.py diff --git a/src/cocoa/toga_cocoa/widgets/imageview.py b/src/cocoa/src/toga_cocoa/widgets/imageview.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/imageview.py rename to src/cocoa/src/toga_cocoa/widgets/imageview.py diff --git a/src/cocoa/toga_cocoa/widgets/internal/__init__.py b/src/cocoa/src/toga_cocoa/widgets/internal/__init__.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/internal/__init__.py rename to src/cocoa/src/toga_cocoa/widgets/internal/__init__.py diff --git a/src/cocoa/toga_cocoa/widgets/internal/cells.py b/src/cocoa/src/toga_cocoa/widgets/internal/cells.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/internal/cells.py rename to src/cocoa/src/toga_cocoa/widgets/internal/cells.py diff --git a/src/cocoa/toga_cocoa/widgets/internal/data.py b/src/cocoa/src/toga_cocoa/widgets/internal/data.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/internal/data.py rename to src/cocoa/src/toga_cocoa/widgets/internal/data.py diff --git a/src/cocoa/toga_cocoa/widgets/internal/refresh.py b/src/cocoa/src/toga_cocoa/widgets/internal/refresh.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/internal/refresh.py rename to src/cocoa/src/toga_cocoa/widgets/internal/refresh.py diff --git a/src/cocoa/toga_cocoa/widgets/label.py b/src/cocoa/src/toga_cocoa/widgets/label.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/label.py rename to src/cocoa/src/toga_cocoa/widgets/label.py diff --git a/src/cocoa/toga_cocoa/widgets/multilinetextinput.py b/src/cocoa/src/toga_cocoa/widgets/multilinetextinput.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/multilinetextinput.py rename to src/cocoa/src/toga_cocoa/widgets/multilinetextinput.py diff --git a/src/cocoa/toga_cocoa/widgets/numberinput.py b/src/cocoa/src/toga_cocoa/widgets/numberinput.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/numberinput.py rename to src/cocoa/src/toga_cocoa/widgets/numberinput.py diff --git a/src/cocoa/toga_cocoa/widgets/optioncontainer.py b/src/cocoa/src/toga_cocoa/widgets/optioncontainer.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/optioncontainer.py rename to src/cocoa/src/toga_cocoa/widgets/optioncontainer.py diff --git a/src/cocoa/toga_cocoa/widgets/passwordinput.py b/src/cocoa/src/toga_cocoa/widgets/passwordinput.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/passwordinput.py rename to src/cocoa/src/toga_cocoa/widgets/passwordinput.py diff --git a/src/cocoa/toga_cocoa/widgets/progressbar.py b/src/cocoa/src/toga_cocoa/widgets/progressbar.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/progressbar.py rename to src/cocoa/src/toga_cocoa/widgets/progressbar.py diff --git a/src/cocoa/toga_cocoa/widgets/scrollcontainer.py b/src/cocoa/src/toga_cocoa/widgets/scrollcontainer.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/scrollcontainer.py rename to src/cocoa/src/toga_cocoa/widgets/scrollcontainer.py diff --git a/src/cocoa/toga_cocoa/widgets/selection.py b/src/cocoa/src/toga_cocoa/widgets/selection.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/selection.py rename to src/cocoa/src/toga_cocoa/widgets/selection.py diff --git a/src/cocoa/toga_cocoa/widgets/slider.py b/src/cocoa/src/toga_cocoa/widgets/slider.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/slider.py rename to src/cocoa/src/toga_cocoa/widgets/slider.py diff --git a/src/cocoa/toga_cocoa/widgets/splitcontainer.py b/src/cocoa/src/toga_cocoa/widgets/splitcontainer.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/splitcontainer.py rename to src/cocoa/src/toga_cocoa/widgets/splitcontainer.py diff --git a/src/cocoa/toga_cocoa/widgets/switch.py b/src/cocoa/src/toga_cocoa/widgets/switch.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/switch.py rename to src/cocoa/src/toga_cocoa/widgets/switch.py diff --git a/src/cocoa/toga_cocoa/widgets/table.py b/src/cocoa/src/toga_cocoa/widgets/table.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/table.py rename to src/cocoa/src/toga_cocoa/widgets/table.py diff --git a/src/cocoa/toga_cocoa/widgets/textinput.py b/src/cocoa/src/toga_cocoa/widgets/textinput.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/textinput.py rename to src/cocoa/src/toga_cocoa/widgets/textinput.py diff --git a/src/cocoa/toga_cocoa/widgets/tree.py b/src/cocoa/src/toga_cocoa/widgets/tree.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/tree.py rename to src/cocoa/src/toga_cocoa/widgets/tree.py diff --git a/src/cocoa/toga_cocoa/widgets/webview.py b/src/cocoa/src/toga_cocoa/widgets/webview.py similarity index 100% rename from src/cocoa/toga_cocoa/widgets/webview.py rename to src/cocoa/src/toga_cocoa/widgets/webview.py diff --git a/src/cocoa/toga_cocoa/window.py b/src/cocoa/src/toga_cocoa/window.py similarity index 100% rename from src/cocoa/toga_cocoa/window.py rename to src/cocoa/src/toga_cocoa/window.py diff --git a/src/core/MANIFEST.in b/src/core/MANIFEST.in index 661394bb83..07777e3f2c 100644 --- a/src/core/MANIFEST.in +++ b/src/core/MANIFEST.in @@ -1,10 +1,6 @@ include CONTRIBUTING.md include LICENSE include README.rst -recursive-include toga *.py -recursive-include toga/resources *.png -recursive-include toga/resources *.icns -recursive-include toga/resources *.ico recursive-include tests *.py include tests/testbed/installed.dist-info/INSTALLER include tests/testbed/installed.dist-info/METADATA diff --git a/src/core/setup.cfg b/src/core/setup.cfg index 4fb95088b7..e994902f88 100644 --- a/src/core/setup.cfg +++ b/src/core/setup.cfg @@ -50,7 +50,8 @@ keywords = install_requires = travertino>=0.1.3 importlib_metadata; python_version<"3.8" -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False @@ -60,11 +61,6 @@ toga.resources = *.ico *.png -[options.packages.find] -include = - toga - toga.* - [flake8] exclude=\ .eggs/*,\ diff --git a/src/core/setup.py b/src/core/setup.py index 3ac14b412a..2e109950d0 100644 --- a/src/core/setup.py +++ b/src/core/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga to compute the version; # and to support versioned subpackage dependencies -with open('toga/__init__.py', encoding='utf8') as version_file: +with open('src/toga/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/core/toga/__init__.py b/src/core/src/toga/__init__.py similarity index 100% rename from src/core/toga/__init__.py rename to src/core/src/toga/__init__.py diff --git a/src/core/toga/app.py b/src/core/src/toga/app.py similarity index 100% rename from src/core/toga/app.py rename to src/core/src/toga/app.py diff --git a/src/core/toga/colors.py b/src/core/src/toga/colors.py similarity index 100% rename from src/core/toga/colors.py rename to src/core/src/toga/colors.py diff --git a/src/core/toga/command.py b/src/core/src/toga/command.py similarity index 100% rename from src/core/toga/command.py rename to src/core/src/toga/command.py diff --git a/src/core/toga/constants/__init__.py b/src/core/src/toga/constants/__init__.py similarity index 100% rename from src/core/toga/constants/__init__.py rename to src/core/src/toga/constants/__init__.py diff --git a/src/core/toga/documents.py b/src/core/src/toga/documents.py similarity index 100% rename from src/core/toga/documents.py rename to src/core/src/toga/documents.py diff --git a/src/core/toga/fonts.py b/src/core/src/toga/fonts.py similarity index 100% rename from src/core/toga/fonts.py rename to src/core/src/toga/fonts.py diff --git a/src/core/toga/handlers.py b/src/core/src/toga/handlers.py similarity index 100% rename from src/core/toga/handlers.py rename to src/core/src/toga/handlers.py diff --git a/src/core/toga/hardware/__init__.py b/src/core/src/toga/hardware/__init__.py similarity index 100% rename from src/core/toga/hardware/__init__.py rename to src/core/src/toga/hardware/__init__.py diff --git a/src/core/toga/icons.py b/src/core/src/toga/icons.py similarity index 100% rename from src/core/toga/icons.py rename to src/core/src/toga/icons.py diff --git a/src/core/toga/images.py b/src/core/src/toga/images.py similarity index 100% rename from src/core/toga/images.py rename to src/core/src/toga/images.py diff --git a/src/core/toga/keys.py b/src/core/src/toga/keys.py similarity index 100% rename from src/core/toga/keys.py rename to src/core/src/toga/keys.py diff --git a/src/core/toga/platform.py b/src/core/src/toga/platform.py similarity index 100% rename from src/core/toga/platform.py rename to src/core/src/toga/platform.py diff --git a/src/core/toga/resources/__init__.py b/src/core/src/toga/resources/__init__.py similarity index 100% rename from src/core/toga/resources/__init__.py rename to src/core/src/toga/resources/__init__.py diff --git a/src/core/toga/resources/toga-32.png b/src/core/src/toga/resources/toga-32.png similarity index 100% rename from src/core/toga/resources/toga-32.png rename to src/core/src/toga/resources/toga-32.png diff --git a/src/core/toga/resources/toga.icns b/src/core/src/toga/resources/toga.icns similarity index 100% rename from src/core/toga/resources/toga.icns rename to src/core/src/toga/resources/toga.icns diff --git a/src/core/toga/resources/toga.ico b/src/core/src/toga/resources/toga.ico similarity index 100% rename from src/core/toga/resources/toga.ico rename to src/core/src/toga/resources/toga.ico diff --git a/src/core/toga/sources/__init__.py b/src/core/src/toga/sources/__init__.py similarity index 100% rename from src/core/toga/sources/__init__.py rename to src/core/src/toga/sources/__init__.py diff --git a/src/core/toga/sources/accessors.py b/src/core/src/toga/sources/accessors.py similarity index 100% rename from src/core/toga/sources/accessors.py rename to src/core/src/toga/sources/accessors.py diff --git a/src/core/toga/sources/base.py b/src/core/src/toga/sources/base.py similarity index 100% rename from src/core/toga/sources/base.py rename to src/core/src/toga/sources/base.py diff --git a/src/core/toga/sources/list_source.py b/src/core/src/toga/sources/list_source.py similarity index 100% rename from src/core/toga/sources/list_source.py rename to src/core/src/toga/sources/list_source.py diff --git a/src/core/toga/sources/tree_source.py b/src/core/src/toga/sources/tree_source.py similarity index 100% rename from src/core/toga/sources/tree_source.py rename to src/core/src/toga/sources/tree_source.py diff --git a/src/core/toga/sources/value_source.py b/src/core/src/toga/sources/value_source.py similarity index 100% rename from src/core/toga/sources/value_source.py rename to src/core/src/toga/sources/value_source.py diff --git a/src/core/toga/style/__init__.py b/src/core/src/toga/style/__init__.py similarity index 100% rename from src/core/toga/style/__init__.py rename to src/core/src/toga/style/__init__.py diff --git a/src/core/toga/style/applicator.py b/src/core/src/toga/style/applicator.py similarity index 100% rename from src/core/toga/style/applicator.py rename to src/core/src/toga/style/applicator.py diff --git a/src/core/toga/style/pack.py b/src/core/src/toga/style/pack.py similarity index 100% rename from src/core/toga/style/pack.py rename to src/core/src/toga/style/pack.py diff --git a/src/core/toga/validators.py b/src/core/src/toga/validators.py similarity index 100% rename from src/core/toga/validators.py rename to src/core/src/toga/validators.py diff --git a/src/core/toga/widgets/__init__.py b/src/core/src/toga/widgets/__init__.py similarity index 100% rename from src/core/toga/widgets/__init__.py rename to src/core/src/toga/widgets/__init__.py diff --git a/src/core/toga/widgets/activityindicator.py b/src/core/src/toga/widgets/activityindicator.py similarity index 100% rename from src/core/toga/widgets/activityindicator.py rename to src/core/src/toga/widgets/activityindicator.py diff --git a/src/core/toga/widgets/base.py b/src/core/src/toga/widgets/base.py similarity index 100% rename from src/core/toga/widgets/base.py rename to src/core/src/toga/widgets/base.py diff --git a/src/core/toga/widgets/box.py b/src/core/src/toga/widgets/box.py similarity index 100% rename from src/core/toga/widgets/box.py rename to src/core/src/toga/widgets/box.py diff --git a/src/core/toga/widgets/button.py b/src/core/src/toga/widgets/button.py similarity index 100% rename from src/core/toga/widgets/button.py rename to src/core/src/toga/widgets/button.py diff --git a/src/core/toga/widgets/canvas.py b/src/core/src/toga/widgets/canvas.py similarity index 100% rename from src/core/toga/widgets/canvas.py rename to src/core/src/toga/widgets/canvas.py diff --git a/src/core/toga/widgets/datepicker.py b/src/core/src/toga/widgets/datepicker.py similarity index 100% rename from src/core/toga/widgets/datepicker.py rename to src/core/src/toga/widgets/datepicker.py diff --git a/src/core/toga/widgets/detailedlist.py b/src/core/src/toga/widgets/detailedlist.py similarity index 100% rename from src/core/toga/widgets/detailedlist.py rename to src/core/src/toga/widgets/detailedlist.py diff --git a/src/core/toga/widgets/divider.py b/src/core/src/toga/widgets/divider.py similarity index 100% rename from src/core/toga/widgets/divider.py rename to src/core/src/toga/widgets/divider.py diff --git a/src/core/toga/widgets/imageview.py b/src/core/src/toga/widgets/imageview.py similarity index 100% rename from src/core/toga/widgets/imageview.py rename to src/core/src/toga/widgets/imageview.py diff --git a/src/core/toga/widgets/label.py b/src/core/src/toga/widgets/label.py similarity index 100% rename from src/core/toga/widgets/label.py rename to src/core/src/toga/widgets/label.py diff --git a/src/core/toga/widgets/multilinetextinput.py b/src/core/src/toga/widgets/multilinetextinput.py similarity index 100% rename from src/core/toga/widgets/multilinetextinput.py rename to src/core/src/toga/widgets/multilinetextinput.py diff --git a/src/core/toga/widgets/navigationview.py b/src/core/src/toga/widgets/navigationview.py similarity index 100% rename from src/core/toga/widgets/navigationview.py rename to src/core/src/toga/widgets/navigationview.py diff --git a/src/core/toga/widgets/numberinput.py b/src/core/src/toga/widgets/numberinput.py similarity index 100% rename from src/core/toga/widgets/numberinput.py rename to src/core/src/toga/widgets/numberinput.py diff --git a/src/core/toga/widgets/optioncontainer.py b/src/core/src/toga/widgets/optioncontainer.py similarity index 100% rename from src/core/toga/widgets/optioncontainer.py rename to src/core/src/toga/widgets/optioncontainer.py diff --git a/src/core/toga/widgets/passwordinput.py b/src/core/src/toga/widgets/passwordinput.py similarity index 100% rename from src/core/toga/widgets/passwordinput.py rename to src/core/src/toga/widgets/passwordinput.py diff --git a/src/core/toga/widgets/progressbar.py b/src/core/src/toga/widgets/progressbar.py similarity index 100% rename from src/core/toga/widgets/progressbar.py rename to src/core/src/toga/widgets/progressbar.py diff --git a/src/core/toga/widgets/scrollcontainer.py b/src/core/src/toga/widgets/scrollcontainer.py similarity index 100% rename from src/core/toga/widgets/scrollcontainer.py rename to src/core/src/toga/widgets/scrollcontainer.py diff --git a/src/core/toga/widgets/selection.py b/src/core/src/toga/widgets/selection.py similarity index 100% rename from src/core/toga/widgets/selection.py rename to src/core/src/toga/widgets/selection.py diff --git a/src/core/toga/widgets/slider.py b/src/core/src/toga/widgets/slider.py similarity index 100% rename from src/core/toga/widgets/slider.py rename to src/core/src/toga/widgets/slider.py diff --git a/src/core/toga/widgets/splitcontainer.py b/src/core/src/toga/widgets/splitcontainer.py similarity index 100% rename from src/core/toga/widgets/splitcontainer.py rename to src/core/src/toga/widgets/splitcontainer.py diff --git a/src/core/toga/widgets/switch.py b/src/core/src/toga/widgets/switch.py similarity index 100% rename from src/core/toga/widgets/switch.py rename to src/core/src/toga/widgets/switch.py diff --git a/src/core/toga/widgets/table.py b/src/core/src/toga/widgets/table.py similarity index 100% rename from src/core/toga/widgets/table.py rename to src/core/src/toga/widgets/table.py diff --git a/src/core/toga/widgets/textinput.py b/src/core/src/toga/widgets/textinput.py similarity index 100% rename from src/core/toga/widgets/textinput.py rename to src/core/src/toga/widgets/textinput.py diff --git a/src/core/toga/widgets/timepicker.py b/src/core/src/toga/widgets/timepicker.py similarity index 100% rename from src/core/toga/widgets/timepicker.py rename to src/core/src/toga/widgets/timepicker.py diff --git a/src/core/toga/widgets/tree.py b/src/core/src/toga/widgets/tree.py similarity index 100% rename from src/core/toga/widgets/tree.py rename to src/core/src/toga/widgets/tree.py diff --git a/src/core/toga/widgets/webview.py b/src/core/src/toga/widgets/webview.py similarity index 100% rename from src/core/toga/widgets/webview.py rename to src/core/src/toga/widgets/webview.py diff --git a/src/core/toga/window.py b/src/core/src/toga/window.py similarity index 100% rename from src/core/toga/window.py rename to src/core/src/toga/window.py diff --git a/src/dummy/MANIFEST.in b/src/dummy/MANIFEST.in index dbb91b2539..455ed92af4 100644 --- a/src/dummy/MANIFEST.in +++ b/src/dummy/MANIFEST.in @@ -1,4 +1,3 @@ include CONTRIBUTING.md include LICENSE include README.rst -recursive-include toga_dummy *.py diff --git a/src/dummy/setup.cfg b/src/dummy/setup.cfg index dd418c3ade..3ca5544adb 100644 --- a/src/dummy/setup.cfg +++ b/src/dummy/setup.cfg @@ -37,15 +37,11 @@ keywords = testing [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -[options.packages.find] -include = - toga_dummy - toga_dummy.* - [flake8] exclude=\ .eggs/*,\ diff --git a/src/dummy/setup.py b/src/dummy/setup.py index 807d321eeb..fcc354ca09 100644 --- a/src/dummy/setup.py +++ b/src/dummy/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_dummy to compute the version; # and to support versioned subpackage dependencies -with open('toga_dummy/__init__.py', encoding='utf8') as version_file: +with open('src/toga_dummy/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/dummy/toga_dummy/__init__.py b/src/dummy/src/toga_dummy/__init__.py similarity index 100% rename from src/dummy/toga_dummy/__init__.py rename to src/dummy/src/toga_dummy/__init__.py diff --git a/src/dummy/toga_dummy/app.py b/src/dummy/src/toga_dummy/app.py similarity index 100% rename from src/dummy/toga_dummy/app.py rename to src/dummy/src/toga_dummy/app.py diff --git a/src/dummy/toga_dummy/colors.py b/src/dummy/src/toga_dummy/colors.py similarity index 100% rename from src/dummy/toga_dummy/colors.py rename to src/dummy/src/toga_dummy/colors.py diff --git a/src/dummy/toga_dummy/command.py b/src/dummy/src/toga_dummy/command.py similarity index 100% rename from src/dummy/toga_dummy/command.py rename to src/dummy/src/toga_dummy/command.py diff --git a/src/dummy/toga_dummy/container.py b/src/dummy/src/toga_dummy/container.py similarity index 100% rename from src/dummy/toga_dummy/container.py rename to src/dummy/src/toga_dummy/container.py diff --git a/src/dummy/toga_dummy/dialogs.py b/src/dummy/src/toga_dummy/dialogs.py similarity index 100% rename from src/dummy/toga_dummy/dialogs.py rename to src/dummy/src/toga_dummy/dialogs.py diff --git a/src/dummy/toga_dummy/documents.py b/src/dummy/src/toga_dummy/documents.py similarity index 100% rename from src/dummy/toga_dummy/documents.py rename to src/dummy/src/toga_dummy/documents.py diff --git a/src/dummy/toga_dummy/factory.py b/src/dummy/src/toga_dummy/factory.py similarity index 100% rename from src/dummy/toga_dummy/factory.py rename to src/dummy/src/toga_dummy/factory.py diff --git a/src/dummy/toga_dummy/fonts.py b/src/dummy/src/toga_dummy/fonts.py similarity index 100% rename from src/dummy/toga_dummy/fonts.py rename to src/dummy/src/toga_dummy/fonts.py diff --git a/src/dummy/toga_dummy/icons.py b/src/dummy/src/toga_dummy/icons.py similarity index 100% rename from src/dummy/toga_dummy/icons.py rename to src/dummy/src/toga_dummy/icons.py diff --git a/src/dummy/toga_dummy/images.py b/src/dummy/src/toga_dummy/images.py similarity index 100% rename from src/dummy/toga_dummy/images.py rename to src/dummy/src/toga_dummy/images.py diff --git a/src/dummy/toga_dummy/paths.py b/src/dummy/src/toga_dummy/paths.py similarity index 100% rename from src/dummy/toga_dummy/paths.py rename to src/dummy/src/toga_dummy/paths.py diff --git a/src/dummy/toga_dummy/test_implementation.py b/src/dummy/src/toga_dummy/test_implementation.py similarity index 100% rename from src/dummy/toga_dummy/test_implementation.py rename to src/dummy/src/toga_dummy/test_implementation.py diff --git a/src/dummy/toga_dummy/utils.py b/src/dummy/src/toga_dummy/utils.py similarity index 100% rename from src/dummy/toga_dummy/utils.py rename to src/dummy/src/toga_dummy/utils.py diff --git a/src/dummy/toga_dummy/widgets/__init__.py b/src/dummy/src/toga_dummy/widgets/__init__.py similarity index 100% rename from src/dummy/toga_dummy/widgets/__init__.py rename to src/dummy/src/toga_dummy/widgets/__init__.py diff --git a/src/dummy/toga_dummy/widgets/activityindicator.py b/src/dummy/src/toga_dummy/widgets/activityindicator.py similarity index 100% rename from src/dummy/toga_dummy/widgets/activityindicator.py rename to src/dummy/src/toga_dummy/widgets/activityindicator.py diff --git a/src/dummy/toga_dummy/widgets/base.py b/src/dummy/src/toga_dummy/widgets/base.py similarity index 100% rename from src/dummy/toga_dummy/widgets/base.py rename to src/dummy/src/toga_dummy/widgets/base.py diff --git a/src/dummy/toga_dummy/widgets/box.py b/src/dummy/src/toga_dummy/widgets/box.py similarity index 100% rename from src/dummy/toga_dummy/widgets/box.py rename to src/dummy/src/toga_dummy/widgets/box.py diff --git a/src/dummy/toga_dummy/widgets/button.py b/src/dummy/src/toga_dummy/widgets/button.py similarity index 100% rename from src/dummy/toga_dummy/widgets/button.py rename to src/dummy/src/toga_dummy/widgets/button.py diff --git a/src/dummy/toga_dummy/widgets/canvas.py b/src/dummy/src/toga_dummy/widgets/canvas.py similarity index 100% rename from src/dummy/toga_dummy/widgets/canvas.py rename to src/dummy/src/toga_dummy/widgets/canvas.py diff --git a/src/dummy/toga_dummy/widgets/datepicker.py b/src/dummy/src/toga_dummy/widgets/datepicker.py similarity index 100% rename from src/dummy/toga_dummy/widgets/datepicker.py rename to src/dummy/src/toga_dummy/widgets/datepicker.py diff --git a/src/dummy/toga_dummy/widgets/detailedlist.py b/src/dummy/src/toga_dummy/widgets/detailedlist.py similarity index 100% rename from src/dummy/toga_dummy/widgets/detailedlist.py rename to src/dummy/src/toga_dummy/widgets/detailedlist.py diff --git a/src/dummy/toga_dummy/widgets/divider.py b/src/dummy/src/toga_dummy/widgets/divider.py similarity index 100% rename from src/dummy/toga_dummy/widgets/divider.py rename to src/dummy/src/toga_dummy/widgets/divider.py diff --git a/src/dummy/toga_dummy/widgets/imageview.py b/src/dummy/src/toga_dummy/widgets/imageview.py similarity index 100% rename from src/dummy/toga_dummy/widgets/imageview.py rename to src/dummy/src/toga_dummy/widgets/imageview.py diff --git a/src/dummy/toga_dummy/widgets/label.py b/src/dummy/src/toga_dummy/widgets/label.py similarity index 100% rename from src/dummy/toga_dummy/widgets/label.py rename to src/dummy/src/toga_dummy/widgets/label.py diff --git a/src/dummy/toga_dummy/widgets/multilinetextinput.py b/src/dummy/src/toga_dummy/widgets/multilinetextinput.py similarity index 100% rename from src/dummy/toga_dummy/widgets/multilinetextinput.py rename to src/dummy/src/toga_dummy/widgets/multilinetextinput.py diff --git a/src/dummy/toga_dummy/widgets/navigationview.py b/src/dummy/src/toga_dummy/widgets/navigationview.py similarity index 100% rename from src/dummy/toga_dummy/widgets/navigationview.py rename to src/dummy/src/toga_dummy/widgets/navigationview.py diff --git a/src/dummy/toga_dummy/widgets/numberinput.py b/src/dummy/src/toga_dummy/widgets/numberinput.py similarity index 100% rename from src/dummy/toga_dummy/widgets/numberinput.py rename to src/dummy/src/toga_dummy/widgets/numberinput.py diff --git a/src/dummy/toga_dummy/widgets/optioncontainer.py b/src/dummy/src/toga_dummy/widgets/optioncontainer.py similarity index 100% rename from src/dummy/toga_dummy/widgets/optioncontainer.py rename to src/dummy/src/toga_dummy/widgets/optioncontainer.py diff --git a/src/dummy/toga_dummy/widgets/passwordinput.py b/src/dummy/src/toga_dummy/widgets/passwordinput.py similarity index 100% rename from src/dummy/toga_dummy/widgets/passwordinput.py rename to src/dummy/src/toga_dummy/widgets/passwordinput.py diff --git a/src/dummy/toga_dummy/widgets/progressbar.py b/src/dummy/src/toga_dummy/widgets/progressbar.py similarity index 100% rename from src/dummy/toga_dummy/widgets/progressbar.py rename to src/dummy/src/toga_dummy/widgets/progressbar.py diff --git a/src/dummy/toga_dummy/widgets/scrollcontainer.py b/src/dummy/src/toga_dummy/widgets/scrollcontainer.py similarity index 100% rename from src/dummy/toga_dummy/widgets/scrollcontainer.py rename to src/dummy/src/toga_dummy/widgets/scrollcontainer.py diff --git a/src/dummy/toga_dummy/widgets/selection.py b/src/dummy/src/toga_dummy/widgets/selection.py similarity index 100% rename from src/dummy/toga_dummy/widgets/selection.py rename to src/dummy/src/toga_dummy/widgets/selection.py diff --git a/src/dummy/toga_dummy/widgets/slider.py b/src/dummy/src/toga_dummy/widgets/slider.py similarity index 100% rename from src/dummy/toga_dummy/widgets/slider.py rename to src/dummy/src/toga_dummy/widgets/slider.py diff --git a/src/dummy/toga_dummy/widgets/splitcontainer.py b/src/dummy/src/toga_dummy/widgets/splitcontainer.py similarity index 100% rename from src/dummy/toga_dummy/widgets/splitcontainer.py rename to src/dummy/src/toga_dummy/widgets/splitcontainer.py diff --git a/src/dummy/toga_dummy/widgets/switch.py b/src/dummy/src/toga_dummy/widgets/switch.py similarity index 100% rename from src/dummy/toga_dummy/widgets/switch.py rename to src/dummy/src/toga_dummy/widgets/switch.py diff --git a/src/dummy/toga_dummy/widgets/table.py b/src/dummy/src/toga_dummy/widgets/table.py similarity index 100% rename from src/dummy/toga_dummy/widgets/table.py rename to src/dummy/src/toga_dummy/widgets/table.py diff --git a/src/dummy/toga_dummy/widgets/textinput.py b/src/dummy/src/toga_dummy/widgets/textinput.py similarity index 100% rename from src/dummy/toga_dummy/widgets/textinput.py rename to src/dummy/src/toga_dummy/widgets/textinput.py diff --git a/src/dummy/toga_dummy/widgets/timepicker.py b/src/dummy/src/toga_dummy/widgets/timepicker.py similarity index 100% rename from src/dummy/toga_dummy/widgets/timepicker.py rename to src/dummy/src/toga_dummy/widgets/timepicker.py diff --git a/src/dummy/toga_dummy/widgets/tree.py b/src/dummy/src/toga_dummy/widgets/tree.py similarity index 100% rename from src/dummy/toga_dummy/widgets/tree.py rename to src/dummy/src/toga_dummy/widgets/tree.py diff --git a/src/dummy/toga_dummy/widgets/webview.py b/src/dummy/src/toga_dummy/widgets/webview.py similarity index 100% rename from src/dummy/toga_dummy/widgets/webview.py rename to src/dummy/src/toga_dummy/widgets/webview.py diff --git a/src/dummy/toga_dummy/window.py b/src/dummy/src/toga_dummy/window.py similarity index 100% rename from src/dummy/toga_dummy/window.py rename to src/dummy/src/toga_dummy/window.py diff --git a/src/gtk/MANIFEST.in b/src/gtk/MANIFEST.in index 2adcd07a63..87588f6f9a 100644 --- a/src/gtk/MANIFEST.in +++ b/src/gtk/MANIFEST.in @@ -1,5 +1,4 @@ include CONTRIBUTING.md include LICENSE include README.rst -recursive-include toga_gtk *.py recursive-include tests *.py \ No newline at end of file diff --git a/src/gtk/setup.cfg b/src/gtk/setup.cfg index b06236abc0..848dad4e68 100644 --- a/src/gtk/setup.cfg +++ b/src/gtk/setup.cfg @@ -39,15 +39,11 @@ keywords = gtk [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -[options.packages.find] -include = - toga_gtk - toga_gtk.* - [flake8] exclude=\ .eggs/*,\ diff --git a/src/gtk/setup.py b/src/gtk/setup.py index 90011e9fcf..601f5ebf49 100644 --- a/src/gtk/setup.py +++ b/src/gtk/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_gtk to compute the version; # and to support versioned subpackage dependencies -with open('toga_gtk/__init__.py', encoding='utf8') as version_file: +with open('src/toga_gtk/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/gtk/toga_gtk/__init__.py b/src/gtk/src/toga_gtk/__init__.py similarity index 100% rename from src/gtk/toga_gtk/__init__.py rename to src/gtk/src/toga_gtk/__init__.py diff --git a/src/gtk/toga_gtk/app.py b/src/gtk/src/toga_gtk/app.py similarity index 100% rename from src/gtk/toga_gtk/app.py rename to src/gtk/src/toga_gtk/app.py diff --git a/src/gtk/toga_gtk/colors.py b/src/gtk/src/toga_gtk/colors.py similarity index 100% rename from src/gtk/toga_gtk/colors.py rename to src/gtk/src/toga_gtk/colors.py diff --git a/src/gtk/toga_gtk/command.py b/src/gtk/src/toga_gtk/command.py similarity index 100% rename from src/gtk/toga_gtk/command.py rename to src/gtk/src/toga_gtk/command.py diff --git a/src/gtk/toga_gtk/dialogs.py b/src/gtk/src/toga_gtk/dialogs.py similarity index 100% rename from src/gtk/toga_gtk/dialogs.py rename to src/gtk/src/toga_gtk/dialogs.py diff --git a/src/gtk/toga_gtk/documents.py b/src/gtk/src/toga_gtk/documents.py similarity index 100% rename from src/gtk/toga_gtk/documents.py rename to src/gtk/src/toga_gtk/documents.py diff --git a/src/gtk/toga_gtk/factory.py b/src/gtk/src/toga_gtk/factory.py similarity index 100% rename from src/gtk/toga_gtk/factory.py rename to src/gtk/src/toga_gtk/factory.py diff --git a/src/gtk/toga_gtk/fonts.py b/src/gtk/src/toga_gtk/fonts.py similarity index 100% rename from src/gtk/toga_gtk/fonts.py rename to src/gtk/src/toga_gtk/fonts.py diff --git a/src/gtk/toga_gtk/hardware/__init__.py b/src/gtk/src/toga_gtk/hardware/__init__.py similarity index 100% rename from src/gtk/toga_gtk/hardware/__init__.py rename to src/gtk/src/toga_gtk/hardware/__init__.py diff --git a/src/gtk/toga_gtk/icons.py b/src/gtk/src/toga_gtk/icons.py similarity index 100% rename from src/gtk/toga_gtk/icons.py rename to src/gtk/src/toga_gtk/icons.py diff --git a/src/gtk/toga_gtk/images.py b/src/gtk/src/toga_gtk/images.py similarity index 100% rename from src/gtk/toga_gtk/images.py rename to src/gtk/src/toga_gtk/images.py diff --git a/src/gtk/toga_gtk/keys.py b/src/gtk/src/toga_gtk/keys.py similarity index 100% rename from src/gtk/toga_gtk/keys.py rename to src/gtk/src/toga_gtk/keys.py diff --git a/src/gtk/toga_gtk/libs/__init__.py b/src/gtk/src/toga_gtk/libs/__init__.py similarity index 100% rename from src/gtk/toga_gtk/libs/__init__.py rename to src/gtk/src/toga_gtk/libs/__init__.py diff --git a/src/gtk/toga_gtk/libs/gtk.py b/src/gtk/src/toga_gtk/libs/gtk.py similarity index 100% rename from src/gtk/toga_gtk/libs/gtk.py rename to src/gtk/src/toga_gtk/libs/gtk.py diff --git a/src/gtk/toga_gtk/libs/styles.py b/src/gtk/src/toga_gtk/libs/styles.py similarity index 100% rename from src/gtk/toga_gtk/libs/styles.py rename to src/gtk/src/toga_gtk/libs/styles.py diff --git a/src/gtk/toga_gtk/libs/utils.py b/src/gtk/src/toga_gtk/libs/utils.py similarity index 100% rename from src/gtk/toga_gtk/libs/utils.py rename to src/gtk/src/toga_gtk/libs/utils.py diff --git a/src/gtk/toga_gtk/paths.py b/src/gtk/src/toga_gtk/paths.py similarity index 100% rename from src/gtk/toga_gtk/paths.py rename to src/gtk/src/toga_gtk/paths.py diff --git a/src/gtk/toga_gtk/widgets/__init__.py b/src/gtk/src/toga_gtk/widgets/__init__.py similarity index 100% rename from src/gtk/toga_gtk/widgets/__init__.py rename to src/gtk/src/toga_gtk/widgets/__init__.py diff --git a/src/gtk/toga_gtk/widgets/activityindicator.py b/src/gtk/src/toga_gtk/widgets/activityindicator.py similarity index 100% rename from src/gtk/toga_gtk/widgets/activityindicator.py rename to src/gtk/src/toga_gtk/widgets/activityindicator.py diff --git a/src/gtk/toga_gtk/widgets/base.py b/src/gtk/src/toga_gtk/widgets/base.py similarity index 100% rename from src/gtk/toga_gtk/widgets/base.py rename to src/gtk/src/toga_gtk/widgets/base.py diff --git a/src/gtk/toga_gtk/widgets/box.py b/src/gtk/src/toga_gtk/widgets/box.py similarity index 100% rename from src/gtk/toga_gtk/widgets/box.py rename to src/gtk/src/toga_gtk/widgets/box.py diff --git a/src/gtk/toga_gtk/widgets/button.py b/src/gtk/src/toga_gtk/widgets/button.py similarity index 100% rename from src/gtk/toga_gtk/widgets/button.py rename to src/gtk/src/toga_gtk/widgets/button.py diff --git a/src/gtk/toga_gtk/widgets/canvas.py b/src/gtk/src/toga_gtk/widgets/canvas.py similarity index 100% rename from src/gtk/toga_gtk/widgets/canvas.py rename to src/gtk/src/toga_gtk/widgets/canvas.py diff --git a/src/gtk/toga_gtk/widgets/detailedlist.py b/src/gtk/src/toga_gtk/widgets/detailedlist.py similarity index 100% rename from src/gtk/toga_gtk/widgets/detailedlist.py rename to src/gtk/src/toga_gtk/widgets/detailedlist.py diff --git a/src/gtk/toga_gtk/widgets/divider.py b/src/gtk/src/toga_gtk/widgets/divider.py similarity index 100% rename from src/gtk/toga_gtk/widgets/divider.py rename to src/gtk/src/toga_gtk/widgets/divider.py diff --git a/src/gtk/toga_gtk/widgets/imageview.py b/src/gtk/src/toga_gtk/widgets/imageview.py similarity index 100% rename from src/gtk/toga_gtk/widgets/imageview.py rename to src/gtk/src/toga_gtk/widgets/imageview.py diff --git a/src/gtk/toga_gtk/widgets/internal/__init__.py b/src/gtk/src/toga_gtk/widgets/internal/__init__.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/__init__.py rename to src/gtk/src/toga_gtk/widgets/internal/__init__.py diff --git a/src/gtk/toga_gtk/widgets/internal/buttons/__init__.py b/src/gtk/src/toga_gtk/widgets/internal/buttons/__init__.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/buttons/__init__.py rename to src/gtk/src/toga_gtk/widgets/internal/buttons/__init__.py diff --git a/src/gtk/toga_gtk/widgets/internal/buttons/base.py b/src/gtk/src/toga_gtk/widgets/internal/buttons/base.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/buttons/base.py rename to src/gtk/src/toga_gtk/widgets/internal/buttons/base.py diff --git a/src/gtk/toga_gtk/widgets/internal/buttons/refresh.py b/src/gtk/src/toga_gtk/widgets/internal/buttons/refresh.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/buttons/refresh.py rename to src/gtk/src/toga_gtk/widgets/internal/buttons/refresh.py diff --git a/src/gtk/toga_gtk/widgets/internal/buttons/scroll.py b/src/gtk/src/toga_gtk/widgets/internal/buttons/scroll.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/buttons/scroll.py rename to src/gtk/src/toga_gtk/widgets/internal/buttons/scroll.py diff --git a/src/gtk/toga_gtk/widgets/internal/rows/__init__.py b/src/gtk/src/toga_gtk/widgets/internal/rows/__init__.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/rows/__init__.py rename to src/gtk/src/toga_gtk/widgets/internal/rows/__init__.py diff --git a/src/gtk/toga_gtk/widgets/internal/rows/base.py b/src/gtk/src/toga_gtk/widgets/internal/rows/base.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/rows/base.py rename to src/gtk/src/toga_gtk/widgets/internal/rows/base.py diff --git a/src/gtk/toga_gtk/widgets/internal/rows/scrollable.py b/src/gtk/src/toga_gtk/widgets/internal/rows/scrollable.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/rows/scrollable.py rename to src/gtk/src/toga_gtk/widgets/internal/rows/scrollable.py diff --git a/src/gtk/toga_gtk/widgets/internal/rows/texticon.py b/src/gtk/src/toga_gtk/widgets/internal/rows/texticon.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/rows/texticon.py rename to src/gtk/src/toga_gtk/widgets/internal/rows/texticon.py diff --git a/src/gtk/toga_gtk/widgets/internal/sourcetreemodel.py b/src/gtk/src/toga_gtk/widgets/internal/sourcetreemodel.py similarity index 100% rename from src/gtk/toga_gtk/widgets/internal/sourcetreemodel.py rename to src/gtk/src/toga_gtk/widgets/internal/sourcetreemodel.py diff --git a/src/gtk/toga_gtk/widgets/label.py b/src/gtk/src/toga_gtk/widgets/label.py similarity index 100% rename from src/gtk/toga_gtk/widgets/label.py rename to src/gtk/src/toga_gtk/widgets/label.py diff --git a/src/gtk/toga_gtk/widgets/multilinetextinput.py b/src/gtk/src/toga_gtk/widgets/multilinetextinput.py similarity index 100% rename from src/gtk/toga_gtk/widgets/multilinetextinput.py rename to src/gtk/src/toga_gtk/widgets/multilinetextinput.py diff --git a/src/gtk/toga_gtk/widgets/numberinput.py b/src/gtk/src/toga_gtk/widgets/numberinput.py similarity index 100% rename from src/gtk/toga_gtk/widgets/numberinput.py rename to src/gtk/src/toga_gtk/widgets/numberinput.py diff --git a/src/gtk/toga_gtk/widgets/optioncontainer.py b/src/gtk/src/toga_gtk/widgets/optioncontainer.py similarity index 100% rename from src/gtk/toga_gtk/widgets/optioncontainer.py rename to src/gtk/src/toga_gtk/widgets/optioncontainer.py diff --git a/src/gtk/toga_gtk/widgets/passwordinput.py b/src/gtk/src/toga_gtk/widgets/passwordinput.py similarity index 100% rename from src/gtk/toga_gtk/widgets/passwordinput.py rename to src/gtk/src/toga_gtk/widgets/passwordinput.py diff --git a/src/gtk/toga_gtk/widgets/progressbar.py b/src/gtk/src/toga_gtk/widgets/progressbar.py similarity index 100% rename from src/gtk/toga_gtk/widgets/progressbar.py rename to src/gtk/src/toga_gtk/widgets/progressbar.py diff --git a/src/gtk/toga_gtk/widgets/scrollcontainer.py b/src/gtk/src/toga_gtk/widgets/scrollcontainer.py similarity index 100% rename from src/gtk/toga_gtk/widgets/scrollcontainer.py rename to src/gtk/src/toga_gtk/widgets/scrollcontainer.py diff --git a/src/gtk/toga_gtk/widgets/selection.py b/src/gtk/src/toga_gtk/widgets/selection.py similarity index 100% rename from src/gtk/toga_gtk/widgets/selection.py rename to src/gtk/src/toga_gtk/widgets/selection.py diff --git a/src/gtk/toga_gtk/widgets/slider.py b/src/gtk/src/toga_gtk/widgets/slider.py similarity index 100% rename from src/gtk/toga_gtk/widgets/slider.py rename to src/gtk/src/toga_gtk/widgets/slider.py diff --git a/src/gtk/toga_gtk/widgets/splitcontainer.py b/src/gtk/src/toga_gtk/widgets/splitcontainer.py similarity index 100% rename from src/gtk/toga_gtk/widgets/splitcontainer.py rename to src/gtk/src/toga_gtk/widgets/splitcontainer.py diff --git a/src/gtk/toga_gtk/widgets/switch.py b/src/gtk/src/toga_gtk/widgets/switch.py similarity index 100% rename from src/gtk/toga_gtk/widgets/switch.py rename to src/gtk/src/toga_gtk/widgets/switch.py diff --git a/src/gtk/toga_gtk/widgets/table.py b/src/gtk/src/toga_gtk/widgets/table.py similarity index 100% rename from src/gtk/toga_gtk/widgets/table.py rename to src/gtk/src/toga_gtk/widgets/table.py diff --git a/src/gtk/toga_gtk/widgets/textinput.py b/src/gtk/src/toga_gtk/widgets/textinput.py similarity index 100% rename from src/gtk/toga_gtk/widgets/textinput.py rename to src/gtk/src/toga_gtk/widgets/textinput.py diff --git a/src/gtk/toga_gtk/widgets/tree.py b/src/gtk/src/toga_gtk/widgets/tree.py similarity index 100% rename from src/gtk/toga_gtk/widgets/tree.py rename to src/gtk/src/toga_gtk/widgets/tree.py diff --git a/src/gtk/toga_gtk/widgets/webview.py b/src/gtk/src/toga_gtk/widgets/webview.py similarity index 100% rename from src/gtk/toga_gtk/widgets/webview.py rename to src/gtk/src/toga_gtk/widgets/webview.py diff --git a/src/gtk/toga_gtk/window.py b/src/gtk/src/toga_gtk/window.py similarity index 100% rename from src/gtk/toga_gtk/window.py rename to src/gtk/src/toga_gtk/window.py diff --git a/src/iOS/MANIFEST.in b/src/iOS/MANIFEST.in index 70a728ca64..ecd14299d5 100644 --- a/src/iOS/MANIFEST.in +++ b/src/iOS/MANIFEST.in @@ -2,4 +2,3 @@ include CONTRIBUTING.md include LICENSE include README.rst recursive-include tests *.py -recursive-include toga_iOS *.py diff --git a/src/iOS/setup.cfg b/src/iOS/setup.cfg index ceba4b29e7..283207d85a 100644 --- a/src/iOS/setup.cfg +++ b/src/iOS/setup.cfg @@ -38,15 +38,11 @@ keywords = iOS [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -[options.packages.find] -include = - toga_iOS - toga_iOS.* - [flake8] exclude=\ .eggs/*,\ diff --git a/src/iOS/setup.py b/src/iOS/setup.py index ac1922378d..73b4ae9d56 100644 --- a/src/iOS/setup.py +++ b/src/iOS/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_iOS to compute the version; # and to support versioned subpackage dependencies -with open('toga_iOS/__init__.py', encoding='utf8') as version_file: +with open('src/toga_iOS/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/iOS/toga_iOS/__init__.py b/src/iOS/src/toga_iOS/__init__.py similarity index 100% rename from src/iOS/toga_iOS/__init__.py rename to src/iOS/src/toga_iOS/__init__.py diff --git a/src/iOS/toga_iOS/app.py b/src/iOS/src/toga_iOS/app.py similarity index 100% rename from src/iOS/toga_iOS/app.py rename to src/iOS/src/toga_iOS/app.py diff --git a/src/iOS/toga_iOS/colors.py b/src/iOS/src/toga_iOS/colors.py similarity index 100% rename from src/iOS/toga_iOS/colors.py rename to src/iOS/src/toga_iOS/colors.py diff --git a/src/iOS/toga_iOS/constraints.py b/src/iOS/src/toga_iOS/constraints.py similarity index 100% rename from src/iOS/toga_iOS/constraints.py rename to src/iOS/src/toga_iOS/constraints.py diff --git a/src/iOS/toga_iOS/dialogs.py b/src/iOS/src/toga_iOS/dialogs.py similarity index 100% rename from src/iOS/toga_iOS/dialogs.py rename to src/iOS/src/toga_iOS/dialogs.py diff --git a/src/iOS/toga_iOS/factory.py b/src/iOS/src/toga_iOS/factory.py similarity index 100% rename from src/iOS/toga_iOS/factory.py rename to src/iOS/src/toga_iOS/factory.py diff --git a/src/iOS/toga_iOS/fonts.py b/src/iOS/src/toga_iOS/fonts.py similarity index 100% rename from src/iOS/toga_iOS/fonts.py rename to src/iOS/src/toga_iOS/fonts.py diff --git a/src/iOS/toga_iOS/hardware/__init__.py b/src/iOS/src/toga_iOS/hardware/__init__.py similarity index 100% rename from src/iOS/toga_iOS/hardware/__init__.py rename to src/iOS/src/toga_iOS/hardware/__init__.py diff --git a/src/iOS/toga_iOS/icons.py b/src/iOS/src/toga_iOS/icons.py similarity index 100% rename from src/iOS/toga_iOS/icons.py rename to src/iOS/src/toga_iOS/icons.py diff --git a/src/iOS/toga_iOS/images.py b/src/iOS/src/toga_iOS/images.py similarity index 100% rename from src/iOS/toga_iOS/images.py rename to src/iOS/src/toga_iOS/images.py diff --git a/src/iOS/toga_iOS/libs/__init__.py b/src/iOS/src/toga_iOS/libs/__init__.py similarity index 100% rename from src/iOS/toga_iOS/libs/__init__.py rename to src/iOS/src/toga_iOS/libs/__init__.py diff --git a/src/iOS/toga_iOS/libs/core_graphics.py b/src/iOS/src/toga_iOS/libs/core_graphics.py similarity index 100% rename from src/iOS/toga_iOS/libs/core_graphics.py rename to src/iOS/src/toga_iOS/libs/core_graphics.py diff --git a/src/iOS/toga_iOS/libs/foundation.py b/src/iOS/src/toga_iOS/libs/foundation.py similarity index 100% rename from src/iOS/toga_iOS/libs/foundation.py rename to src/iOS/src/toga_iOS/libs/foundation.py diff --git a/src/iOS/toga_iOS/libs/uikit.py b/src/iOS/src/toga_iOS/libs/uikit.py similarity index 100% rename from src/iOS/toga_iOS/libs/uikit.py rename to src/iOS/src/toga_iOS/libs/uikit.py diff --git a/src/iOS/toga_iOS/libs/webkit.py b/src/iOS/src/toga_iOS/libs/webkit.py similarity index 100% rename from src/iOS/toga_iOS/libs/webkit.py rename to src/iOS/src/toga_iOS/libs/webkit.py diff --git a/src/iOS/toga_iOS/paths.py b/src/iOS/src/toga_iOS/paths.py similarity index 100% rename from src/iOS/toga_iOS/paths.py rename to src/iOS/src/toga_iOS/paths.py diff --git a/src/iOS/toga_iOS/widgets/__init__.py b/src/iOS/src/toga_iOS/widgets/__init__.py similarity index 100% rename from src/iOS/toga_iOS/widgets/__init__.py rename to src/iOS/src/toga_iOS/widgets/__init__.py diff --git a/src/iOS/toga_iOS/widgets/base.py b/src/iOS/src/toga_iOS/widgets/base.py similarity index 100% rename from src/iOS/toga_iOS/widgets/base.py rename to src/iOS/src/toga_iOS/widgets/base.py diff --git a/src/iOS/toga_iOS/widgets/box.py b/src/iOS/src/toga_iOS/widgets/box.py similarity index 100% rename from src/iOS/toga_iOS/widgets/box.py rename to src/iOS/src/toga_iOS/widgets/box.py diff --git a/src/iOS/toga_iOS/widgets/button.py b/src/iOS/src/toga_iOS/widgets/button.py similarity index 100% rename from src/iOS/toga_iOS/widgets/button.py rename to src/iOS/src/toga_iOS/widgets/button.py diff --git a/src/iOS/toga_iOS/widgets/canvas.py b/src/iOS/src/toga_iOS/widgets/canvas.py similarity index 100% rename from src/iOS/toga_iOS/widgets/canvas.py rename to src/iOS/src/toga_iOS/widgets/canvas.py diff --git a/src/iOS/toga_iOS/widgets/detailedlist.py b/src/iOS/src/toga_iOS/widgets/detailedlist.py similarity index 100% rename from src/iOS/toga_iOS/widgets/detailedlist.py rename to src/iOS/src/toga_iOS/widgets/detailedlist.py diff --git a/src/iOS/toga_iOS/widgets/imageview.py b/src/iOS/src/toga_iOS/widgets/imageview.py similarity index 100% rename from src/iOS/toga_iOS/widgets/imageview.py rename to src/iOS/src/toga_iOS/widgets/imageview.py diff --git a/src/iOS/toga_iOS/widgets/label.py b/src/iOS/src/toga_iOS/widgets/label.py similarity index 100% rename from src/iOS/toga_iOS/widgets/label.py rename to src/iOS/src/toga_iOS/widgets/label.py diff --git a/src/iOS/toga_iOS/widgets/multilinetextinput.py b/src/iOS/src/toga_iOS/widgets/multilinetextinput.py similarity index 100% rename from src/iOS/toga_iOS/widgets/multilinetextinput.py rename to src/iOS/src/toga_iOS/widgets/multilinetextinput.py diff --git a/src/iOS/toga_iOS/widgets/navigationview.py b/src/iOS/src/toga_iOS/widgets/navigationview.py similarity index 100% rename from src/iOS/toga_iOS/widgets/navigationview.py rename to src/iOS/src/toga_iOS/widgets/navigationview.py diff --git a/src/iOS/toga_iOS/widgets/numberinput.py b/src/iOS/src/toga_iOS/widgets/numberinput.py similarity index 100% rename from src/iOS/toga_iOS/widgets/numberinput.py rename to src/iOS/src/toga_iOS/widgets/numberinput.py diff --git a/src/iOS/toga_iOS/widgets/passwordinput.py b/src/iOS/src/toga_iOS/widgets/passwordinput.py similarity index 100% rename from src/iOS/toga_iOS/widgets/passwordinput.py rename to src/iOS/src/toga_iOS/widgets/passwordinput.py diff --git a/src/iOS/toga_iOS/widgets/progressbar.py b/src/iOS/src/toga_iOS/widgets/progressbar.py similarity index 100% rename from src/iOS/toga_iOS/widgets/progressbar.py rename to src/iOS/src/toga_iOS/widgets/progressbar.py diff --git a/src/iOS/toga_iOS/widgets/scrollcontainer.py b/src/iOS/src/toga_iOS/widgets/scrollcontainer.py similarity index 100% rename from src/iOS/toga_iOS/widgets/scrollcontainer.py rename to src/iOS/src/toga_iOS/widgets/scrollcontainer.py diff --git a/src/iOS/toga_iOS/widgets/selection.py b/src/iOS/src/toga_iOS/widgets/selection.py similarity index 100% rename from src/iOS/toga_iOS/widgets/selection.py rename to src/iOS/src/toga_iOS/widgets/selection.py diff --git a/src/iOS/toga_iOS/widgets/slider.py b/src/iOS/src/toga_iOS/widgets/slider.py similarity index 100% rename from src/iOS/toga_iOS/widgets/slider.py rename to src/iOS/src/toga_iOS/widgets/slider.py diff --git a/src/iOS/toga_iOS/widgets/switch.py b/src/iOS/src/toga_iOS/widgets/switch.py similarity index 100% rename from src/iOS/toga_iOS/widgets/switch.py rename to src/iOS/src/toga_iOS/widgets/switch.py diff --git a/src/iOS/toga_iOS/widgets/textinput.py b/src/iOS/src/toga_iOS/widgets/textinput.py similarity index 100% rename from src/iOS/toga_iOS/widgets/textinput.py rename to src/iOS/src/toga_iOS/widgets/textinput.py diff --git a/src/iOS/toga_iOS/widgets/webview.py b/src/iOS/src/toga_iOS/widgets/webview.py similarity index 100% rename from src/iOS/toga_iOS/widgets/webview.py rename to src/iOS/src/toga_iOS/widgets/webview.py diff --git a/src/iOS/toga_iOS/window.py b/src/iOS/src/toga_iOS/window.py similarity index 100% rename from src/iOS/toga_iOS/window.py rename to src/iOS/src/toga_iOS/window.py diff --git a/src/web/MANIFEST.in b/src/web/MANIFEST.in index 744d92c395..ecd14299d5 100644 --- a/src/web/MANIFEST.in +++ b/src/web/MANIFEST.in @@ -2,5 +2,3 @@ include CONTRIBUTING.md include LICENSE include README.rst recursive-include tests *.py -recursive-include toga_web *.py -recursive-include toga_web/static *.css \ No newline at end of file diff --git a/src/web/setup.cfg b/src/web/setup.cfg index ed72fe0df4..3e600c5517 100644 --- a/src/web/setup.cfg +++ b/src/web/setup.cfg @@ -37,19 +37,14 @@ keywords = web [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -include_package_data = True [options.package_data] toga_web = - toga_web/static/toga.css - -[options.packages.find] -include = - toga_web - toga_web.* + static/** [flake8] exclude=\ diff --git a/src/web/setup.py b/src/web/setup.py index a567556342..83ff099f73 100644 --- a/src/web/setup.py +++ b/src/web/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_web to compute the version; # and to support versioned subpackage dependencies -with open('toga_web/__init__.py', encoding='utf8') as version_file: +with open('src/toga_web/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/web/toga_web/__init__.py b/src/web/src/toga_web/__init__.py similarity index 100% rename from src/web/toga_web/__init__.py rename to src/web/src/toga_web/__init__.py diff --git a/src/web/toga_web/app.py b/src/web/src/toga_web/app.py similarity index 100% rename from src/web/toga_web/app.py rename to src/web/src/toga_web/app.py diff --git a/src/web/toga_web/command.py b/src/web/src/toga_web/command.py similarity index 100% rename from src/web/toga_web/command.py rename to src/web/src/toga_web/command.py diff --git a/src/web/toga_web/dialogs.py b/src/web/src/toga_web/dialogs.py similarity index 100% rename from src/web/toga_web/dialogs.py rename to src/web/src/toga_web/dialogs.py diff --git a/src/web/toga_web/factory.py b/src/web/src/toga_web/factory.py similarity index 100% rename from src/web/toga_web/factory.py rename to src/web/src/toga_web/factory.py diff --git a/src/web/toga_web/icons.py b/src/web/src/toga_web/icons.py similarity index 100% rename from src/web/toga_web/icons.py rename to src/web/src/toga_web/icons.py diff --git a/src/web/toga_web/libs.py b/src/web/src/toga_web/libs.py similarity index 100% rename from src/web/toga_web/libs.py rename to src/web/src/toga_web/libs.py diff --git a/src/web/toga_web/paths.py b/src/web/src/toga_web/paths.py similarity index 100% rename from src/web/toga_web/paths.py rename to src/web/src/toga_web/paths.py diff --git a/src/web/toga_web/static/toga.css b/src/web/src/toga_web/static/toga.css similarity index 100% rename from src/web/toga_web/static/toga.css rename to src/web/src/toga_web/static/toga.css diff --git a/src/web/toga_web/widgets/__init__.py b/src/web/src/toga_web/widgets/__init__.py similarity index 100% rename from src/web/toga_web/widgets/__init__.py rename to src/web/src/toga_web/widgets/__init__.py diff --git a/src/web/toga_web/widgets/base.py b/src/web/src/toga_web/widgets/base.py similarity index 100% rename from src/web/toga_web/widgets/base.py rename to src/web/src/toga_web/widgets/base.py diff --git a/src/web/toga_web/widgets/box.py b/src/web/src/toga_web/widgets/box.py similarity index 100% rename from src/web/toga_web/widgets/box.py rename to src/web/src/toga_web/widgets/box.py diff --git a/src/web/toga_web/widgets/button.py b/src/web/src/toga_web/widgets/button.py similarity index 100% rename from src/web/toga_web/widgets/button.py rename to src/web/src/toga_web/widgets/button.py diff --git a/src/web/toga_web/widgets/label.py b/src/web/src/toga_web/widgets/label.py similarity index 100% rename from src/web/toga_web/widgets/label.py rename to src/web/src/toga_web/widgets/label.py diff --git a/src/web/toga_web/widgets/textinput.py b/src/web/src/toga_web/widgets/textinput.py similarity index 100% rename from src/web/toga_web/widgets/textinput.py rename to src/web/src/toga_web/widgets/textinput.py diff --git a/src/web/toga_web/window.py b/src/web/src/toga_web/window.py similarity index 100% rename from src/web/toga_web/window.py rename to src/web/src/toga_web/window.py diff --git a/src/winforms/MANIFEST.in b/src/winforms/MANIFEST.in index 145cd1e92f..ecd14299d5 100644 --- a/src/winforms/MANIFEST.in +++ b/src/winforms/MANIFEST.in @@ -1,8 +1,4 @@ include CONTRIBUTING.md include LICENSE include README.rst -include toga_winforms/libs/WebView2/LICENSE.md -include toga_winforms/libs/WebView2/README.md -recursive-include toga_winforms *.py recursive-include tests *.py -recursive-include toga_winforms/libs/WebView2 *.dll diff --git a/src/winforms/setup.cfg b/src/winforms/setup.cfg index d4737626d7..5a2eeb3a60 100644 --- a/src/winforms/setup.cfg +++ b/src/winforms/setup.cfg @@ -39,24 +39,14 @@ keywords = winforms [options] -packages = find: +package_dir = + = src python_requires = >= 3.6 zip_safe = False -include_package_data = True [options.package_data] toga_winforms = - toga_winforms/libs/WebView2/LICENSE.md - toga_winforms/libs/WebView2/Microsoft.Web.WebView2.Core.dll - toga_winforms/libs/WebView2/Microsoft.Web.WebView2.WinForms.dll - toga_winforms/libs/WebView2/arm64/WebView2Loader.dll - toga_winforms/libs/WebView2/x64/WebView2Loader.dll - toga_winforms/libs/WebView2/x86/WebView2Loader.dll - -[options.packages.find] -include = - toga_winforms - toga_winforms.* + libs/WebView2/** [flake8] exclude=\ diff --git a/src/winforms/setup.py b/src/winforms/setup.py index ea0972d696..e310991ced 100644 --- a/src/winforms/setup.py +++ b/src/winforms/setup.py @@ -6,7 +6,7 @@ # Version handline needs to be programatic because # we can't import toga_winforms to compute the version; # and to support versioned subpackage dependencies -with open('toga_winforms/__init__.py', encoding='utf8') as version_file: +with open('src/toga_winforms/__init__.py', encoding='utf8') as version_file: version_match = re.search( r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), diff --git a/src/winforms/toga_winforms/__init__.py b/src/winforms/src/toga_winforms/__init__.py similarity index 100% rename from src/winforms/toga_winforms/__init__.py rename to src/winforms/src/toga_winforms/__init__.py diff --git a/src/winforms/toga_winforms/app.py b/src/winforms/src/toga_winforms/app.py similarity index 100% rename from src/winforms/toga_winforms/app.py rename to src/winforms/src/toga_winforms/app.py diff --git a/src/winforms/toga_winforms/colors.py b/src/winforms/src/toga_winforms/colors.py similarity index 100% rename from src/winforms/toga_winforms/colors.py rename to src/winforms/src/toga_winforms/colors.py diff --git a/src/winforms/toga_winforms/command.py b/src/winforms/src/toga_winforms/command.py similarity index 100% rename from src/winforms/toga_winforms/command.py rename to src/winforms/src/toga_winforms/command.py diff --git a/src/winforms/toga_winforms/dialogs.py b/src/winforms/src/toga_winforms/dialogs.py similarity index 100% rename from src/winforms/toga_winforms/dialogs.py rename to src/winforms/src/toga_winforms/dialogs.py diff --git a/src/winforms/toga_winforms/factory.py b/src/winforms/src/toga_winforms/factory.py similarity index 100% rename from src/winforms/toga_winforms/factory.py rename to src/winforms/src/toga_winforms/factory.py diff --git a/src/winforms/toga_winforms/fonts.py b/src/winforms/src/toga_winforms/fonts.py similarity index 100% rename from src/winforms/toga_winforms/fonts.py rename to src/winforms/src/toga_winforms/fonts.py diff --git a/src/winforms/toga_winforms/hardware/__init__.py b/src/winforms/src/toga_winforms/hardware/__init__.py similarity index 100% rename from src/winforms/toga_winforms/hardware/__init__.py rename to src/winforms/src/toga_winforms/hardware/__init__.py diff --git a/src/winforms/toga_winforms/icons.py b/src/winforms/src/toga_winforms/icons.py similarity index 100% rename from src/winforms/toga_winforms/icons.py rename to src/winforms/src/toga_winforms/icons.py diff --git a/src/winforms/toga_winforms/images.py b/src/winforms/src/toga_winforms/images.py similarity index 100% rename from src/winforms/toga_winforms/images.py rename to src/winforms/src/toga_winforms/images.py diff --git a/src/winforms/toga_winforms/keys.py b/src/winforms/src/toga_winforms/keys.py similarity index 100% rename from src/winforms/toga_winforms/keys.py rename to src/winforms/src/toga_winforms/keys.py diff --git a/src/winforms/toga_winforms/libs/WebView2/LICENSE.md b/src/winforms/src/toga_winforms/libs/WebView2/LICENSE.md similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/LICENSE.md rename to src/winforms/src/toga_winforms/libs/WebView2/LICENSE.md diff --git a/src/winforms/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.Core.dll b/src/winforms/src/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.Core.dll similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.Core.dll rename to src/winforms/src/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.Core.dll diff --git a/src/winforms/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.WinForms.dll b/src/winforms/src/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.WinForms.dll similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.WinForms.dll rename to src/winforms/src/toga_winforms/libs/WebView2/Microsoft.Web.WebView2.WinForms.dll diff --git a/src/winforms/toga_winforms/libs/WebView2/README.md b/src/winforms/src/toga_winforms/libs/WebView2/README.md similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/README.md rename to src/winforms/src/toga_winforms/libs/WebView2/README.md diff --git a/src/winforms/toga_winforms/libs/WebView2/arm64/WebView2Loader.dll b/src/winforms/src/toga_winforms/libs/WebView2/arm64/WebView2Loader.dll similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/arm64/WebView2Loader.dll rename to src/winforms/src/toga_winforms/libs/WebView2/arm64/WebView2Loader.dll diff --git a/src/winforms/toga_winforms/libs/WebView2/x64/WebView2Loader.dll b/src/winforms/src/toga_winforms/libs/WebView2/x64/WebView2Loader.dll similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/x64/WebView2Loader.dll rename to src/winforms/src/toga_winforms/libs/WebView2/x64/WebView2Loader.dll diff --git a/src/winforms/toga_winforms/libs/WebView2/x86/WebView2Loader.dll b/src/winforms/src/toga_winforms/libs/WebView2/x86/WebView2Loader.dll similarity index 100% rename from src/winforms/toga_winforms/libs/WebView2/x86/WebView2Loader.dll rename to src/winforms/src/toga_winforms/libs/WebView2/x86/WebView2Loader.dll diff --git a/src/winforms/toga_winforms/libs/__init__.py b/src/winforms/src/toga_winforms/libs/__init__.py similarity index 100% rename from src/winforms/toga_winforms/libs/__init__.py rename to src/winforms/src/toga_winforms/libs/__init__.py diff --git a/src/winforms/toga_winforms/libs/extensions.py b/src/winforms/src/toga_winforms/libs/extensions.py similarity index 100% rename from src/winforms/toga_winforms/libs/extensions.py rename to src/winforms/src/toga_winforms/libs/extensions.py diff --git a/src/winforms/toga_winforms/libs/fonts.py b/src/winforms/src/toga_winforms/libs/fonts.py similarity index 100% rename from src/winforms/toga_winforms/libs/fonts.py rename to src/winforms/src/toga_winforms/libs/fonts.py diff --git a/src/winforms/toga_winforms/libs/proactor.py b/src/winforms/src/toga_winforms/libs/proactor.py similarity index 100% rename from src/winforms/toga_winforms/libs/proactor.py rename to src/winforms/src/toga_winforms/libs/proactor.py diff --git a/src/winforms/toga_winforms/libs/winforms.py b/src/winforms/src/toga_winforms/libs/winforms.py similarity index 100% rename from src/winforms/toga_winforms/libs/winforms.py rename to src/winforms/src/toga_winforms/libs/winforms.py diff --git a/src/winforms/toga_winforms/paths.py b/src/winforms/src/toga_winforms/paths.py similarity index 100% rename from src/winforms/toga_winforms/paths.py rename to src/winforms/src/toga_winforms/paths.py diff --git a/src/winforms/toga_winforms/widgets/__init__.py b/src/winforms/src/toga_winforms/widgets/__init__.py similarity index 100% rename from src/winforms/toga_winforms/widgets/__init__.py rename to src/winforms/src/toga_winforms/widgets/__init__.py diff --git a/src/winforms/toga_winforms/widgets/base.py b/src/winforms/src/toga_winforms/widgets/base.py similarity index 100% rename from src/winforms/toga_winforms/widgets/base.py rename to src/winforms/src/toga_winforms/widgets/base.py diff --git a/src/winforms/toga_winforms/widgets/box.py b/src/winforms/src/toga_winforms/widgets/box.py similarity index 100% rename from src/winforms/toga_winforms/widgets/box.py rename to src/winforms/src/toga_winforms/widgets/box.py diff --git a/src/winforms/toga_winforms/widgets/button.py b/src/winforms/src/toga_winforms/widgets/button.py similarity index 100% rename from src/winforms/toga_winforms/widgets/button.py rename to src/winforms/src/toga_winforms/widgets/button.py diff --git a/src/winforms/toga_winforms/widgets/canvas.py b/src/winforms/src/toga_winforms/widgets/canvas.py similarity index 100% rename from src/winforms/toga_winforms/widgets/canvas.py rename to src/winforms/src/toga_winforms/widgets/canvas.py diff --git a/src/winforms/toga_winforms/widgets/datepicker.py b/src/winforms/src/toga_winforms/widgets/datepicker.py similarity index 100% rename from src/winforms/toga_winforms/widgets/datepicker.py rename to src/winforms/src/toga_winforms/widgets/datepicker.py diff --git a/src/winforms/toga_winforms/widgets/detailedlist.py b/src/winforms/src/toga_winforms/widgets/detailedlist.py similarity index 100% rename from src/winforms/toga_winforms/widgets/detailedlist.py rename to src/winforms/src/toga_winforms/widgets/detailedlist.py diff --git a/src/winforms/toga_winforms/widgets/divider.py b/src/winforms/src/toga_winforms/widgets/divider.py similarity index 100% rename from src/winforms/toga_winforms/widgets/divider.py rename to src/winforms/src/toga_winforms/widgets/divider.py diff --git a/src/winforms/toga_winforms/widgets/imageview.py b/src/winforms/src/toga_winforms/widgets/imageview.py similarity index 100% rename from src/winforms/toga_winforms/widgets/imageview.py rename to src/winforms/src/toga_winforms/widgets/imageview.py diff --git a/src/winforms/toga_winforms/widgets/label.py b/src/winforms/src/toga_winforms/widgets/label.py similarity index 100% rename from src/winforms/toga_winforms/widgets/label.py rename to src/winforms/src/toga_winforms/widgets/label.py diff --git a/src/winforms/toga_winforms/widgets/multilinetextinput.py b/src/winforms/src/toga_winforms/widgets/multilinetextinput.py similarity index 100% rename from src/winforms/toga_winforms/widgets/multilinetextinput.py rename to src/winforms/src/toga_winforms/widgets/multilinetextinput.py diff --git a/src/winforms/toga_winforms/widgets/numberinput.py b/src/winforms/src/toga_winforms/widgets/numberinput.py similarity index 100% rename from src/winforms/toga_winforms/widgets/numberinput.py rename to src/winforms/src/toga_winforms/widgets/numberinput.py diff --git a/src/winforms/toga_winforms/widgets/optioncontainer.py b/src/winforms/src/toga_winforms/widgets/optioncontainer.py similarity index 100% rename from src/winforms/toga_winforms/widgets/optioncontainer.py rename to src/winforms/src/toga_winforms/widgets/optioncontainer.py diff --git a/src/winforms/toga_winforms/widgets/passwordinput.py b/src/winforms/src/toga_winforms/widgets/passwordinput.py similarity index 100% rename from src/winforms/toga_winforms/widgets/passwordinput.py rename to src/winforms/src/toga_winforms/widgets/passwordinput.py diff --git a/src/winforms/toga_winforms/widgets/progressbar.py b/src/winforms/src/toga_winforms/widgets/progressbar.py similarity index 100% rename from src/winforms/toga_winforms/widgets/progressbar.py rename to src/winforms/src/toga_winforms/widgets/progressbar.py diff --git a/src/winforms/toga_winforms/widgets/scrollcontainer.py b/src/winforms/src/toga_winforms/widgets/scrollcontainer.py similarity index 100% rename from src/winforms/toga_winforms/widgets/scrollcontainer.py rename to src/winforms/src/toga_winforms/widgets/scrollcontainer.py diff --git a/src/winforms/toga_winforms/widgets/selection.py b/src/winforms/src/toga_winforms/widgets/selection.py similarity index 100% rename from src/winforms/toga_winforms/widgets/selection.py rename to src/winforms/src/toga_winforms/widgets/selection.py diff --git a/src/winforms/toga_winforms/widgets/slider.py b/src/winforms/src/toga_winforms/widgets/slider.py similarity index 100% rename from src/winforms/toga_winforms/widgets/slider.py rename to src/winforms/src/toga_winforms/widgets/slider.py diff --git a/src/winforms/toga_winforms/widgets/splitcontainer.py b/src/winforms/src/toga_winforms/widgets/splitcontainer.py similarity index 100% rename from src/winforms/toga_winforms/widgets/splitcontainer.py rename to src/winforms/src/toga_winforms/widgets/splitcontainer.py diff --git a/src/winforms/toga_winforms/widgets/switch.py b/src/winforms/src/toga_winforms/widgets/switch.py similarity index 100% rename from src/winforms/toga_winforms/widgets/switch.py rename to src/winforms/src/toga_winforms/widgets/switch.py diff --git a/src/winforms/toga_winforms/widgets/table.py b/src/winforms/src/toga_winforms/widgets/table.py similarity index 100% rename from src/winforms/toga_winforms/widgets/table.py rename to src/winforms/src/toga_winforms/widgets/table.py diff --git a/src/winforms/toga_winforms/widgets/textinput.py b/src/winforms/src/toga_winforms/widgets/textinput.py similarity index 100% rename from src/winforms/toga_winforms/widgets/textinput.py rename to src/winforms/src/toga_winforms/widgets/textinput.py diff --git a/src/winforms/toga_winforms/widgets/timepicker.py b/src/winforms/src/toga_winforms/widgets/timepicker.py similarity index 100% rename from src/winforms/toga_winforms/widgets/timepicker.py rename to src/winforms/src/toga_winforms/widgets/timepicker.py diff --git a/src/winforms/toga_winforms/widgets/tree.py b/src/winforms/src/toga_winforms/widgets/tree.py similarity index 100% rename from src/winforms/toga_winforms/widgets/tree.py rename to src/winforms/src/toga_winforms/widgets/tree.py diff --git a/src/winforms/toga_winforms/widgets/webview.py b/src/winforms/src/toga_winforms/widgets/webview.py similarity index 100% rename from src/winforms/toga_winforms/widgets/webview.py rename to src/winforms/src/toga_winforms/widgets/webview.py diff --git a/src/winforms/toga_winforms/window.py b/src/winforms/src/toga_winforms/window.py similarity index 100% rename from src/winforms/toga_winforms/window.py rename to src/winforms/src/toga_winforms/window.py diff --git a/tox.ini b/tox.ini index 377959d1de..e85e6b6de2 100644 --- a/tox.ini +++ b/tox.ini @@ -13,10 +13,11 @@ deps = setuptools pytest-tldr pytest-cov -changedir = {toxinidir} +# TOGA_INSTALL_COMMAND is set to a bash command by the CI workflow. +whitelist_externals = + bash commands: - python -m pip install -e src/core - python -m pip install -e src/dummy + {env:TOGA_INSTALL_COMMAND:pip install src/core src/dummy} pytest src/core/tests --cov --cov-report term-missing {posargs} coverage xml @@ -24,14 +25,12 @@ commands: skip_install = True deps = flake8 -changedir = {toxinidir} commands = flake8 {posargs} # [testenv:towncrier-check] # skip_install = True # deps = # {[testenv:towncrier]deps} -# changedir = {toxinidir} # commands = # python -m towncrier.check @@ -39,7 +38,6 @@ commands = flake8 {posargs} # skip_install = True # deps = # towncrier >= 18.5.0 -# changedir = {toxinidir} # commands = # towncrier {posargs} @@ -48,7 +46,6 @@ skip_install = True deps = -r{toxinidir}/docs/requirements.txt src/core -changedir = {toxinidir} commands = python setup.py build_sphinx -W @@ -59,7 +56,7 @@ deps = wheel twine whitelist_externals = - release.sh -changedir = {toxinidir} + bash commands = - ./release.sh package + # Bash scripts can't be executed directly on Windows. + bash ./release.sh package