diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 79bb7c50a..000000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Upload Python Package -on: - release: - types: [published] -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: microsoft/playwright-github-action@v1 - - name: Set up Node.js - uses: actions/setup-node@v1 - with: - node-version: 12.x - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r local-requirements.txt - pip install . - - name: Build driver - run: python build_driver.py - - name: Build package - run: python build_package.py - - name: Publish package - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: twine upload dist/* diff --git a/.gitignore b/.gitignore index 584189d69..b7eb9ba27 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,4 @@ env/ htmlcov/ .coverage .DS_Store -.vscode/ -.eggs -_repo_version.py +.vscode/ \ No newline at end of file diff --git a/local-requirements.txt b/local-requirements.txt index ba239bb1c..e59115163 100644 --- a/local-requirements.txt +++ b/local-requirements.txt @@ -10,4 +10,3 @@ wheel==0.34.2 black==19.10b0 pre-commit==2.6.0 flake8==3.8.3 -twine==3.2.0 diff --git a/playwright/__init__.py b/playwright/__init__.py index b3ded8c9b..a3dc9d611 100644 --- a/playwright/__init__.py +++ b/playwright/__init__.py @@ -12,7 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -from playwright._repo_version import version as __version__ # noqa:F401 from playwright.main import playwright_object import playwright.helper as helper diff --git a/setup.py b/setup.py index 58577be9c..1e71d714b 100644 --- a/setup.py +++ b/setup.py @@ -19,15 +19,16 @@ setuptools.setup( name="playwright", + version="0.0.3", author="Microsoft Corporation", author_email="", description="A high-level API to automate web browsers", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/Microsoft/playwright-python", - packages=["playwright"], + packages=setuptools.find_packages(), include_package_data=True, - install_requires=["pyee", "typing-extensions"], + install_requires=["pyee", "typing-extensions",], classifiers=[ "Topic :: Software Development :: Testing", "Topic :: Internet :: WWW/HTTP :: Browsers", @@ -39,10 +40,4 @@ "Operating System :: OS Independent", ], python_requires=">=3.7", - use_scm_version={ - "version_scheme": "post-release", - "write_to": "playwright/_repo_version.py", - "write_to_template": 'version = "{version}"\n', - }, - setup_requires=["setuptools_scm"], ) diff --git a/upload_package.py b/upload_package.py new file mode 100644 index 000000000..f1df1c5a1 --- /dev/null +++ b/upload_package.py @@ -0,0 +1,17 @@ +# Copyright (c) Microsoft Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import subprocess + +subprocess.run("python -m twine upload dist/*", shell=True)