diff --git a/.flake8 b/.flake8 index 7b93065c4..0b75922b4 100644 --- a/.flake8 +++ b/.flake8 @@ -16,6 +16,5 @@ exclude = .venv, __init__.py, docs, - setup.py external operator_estimation.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 127093558..5f875e604 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,9 +14,6 @@ cache: - .cache/pip - .venv -.install-dephell: &install-dephell # Install dephell to auto-generate setup.py - - curl -L https://raw.githubusercontent.com/rigetti/dephell/master/install.py | python - .install-npm: &install-npm - curl -sL https://deb.nodesource.com/setup_12.x | bash - - apt-get update @@ -166,13 +163,11 @@ PyPI Publish Branch (TestPyPI): allow_failure: true script: - . scripts/ci_install_deps - - *install-dephell - *install-npm - npx semantic-release --branches $CI_COMMIT_BRANCH --dry-run - export MOST_RECENT_VERSION=$(git describe --abbrev=0 --tags | sed 's/v//') - export VERSION_TAG="${MOST_RECENT_VERSION}.dev${CI_JOB_ID}" - poetry version "$VERSION_TAG" - - dephell deps convert - *publish-pypi-test rules: # Skip this job if running on master or rc @@ -188,7 +183,6 @@ PyPI Publish Branch (TestPyPI): stage: deploy script: - . scripts/ci_install_deps - - *install-dephell - *install-npm # This performs the semantic-release configured in package.json. # Depending on the config, this may add a tag and then publish a GitLab/GitHub release. diff --git a/CHANGELOG.md b/CHANGELOG.md index caaff410e..081576f34 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ Changelog ### Announcements +- `setup.py` has been removed and will no longer be generated as part of the automated release process. + ### Improvements and Changes - Function `pyquil.quilatom.substitute()` now supports substitution of classical `MemoryReference` diff --git a/package.json b/package.json index 8bf7437d9..36b4f5167 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }], "@semantic-release/github", ["@semantic-release/git", { - "assets": ["pyproject.toml", "setup.py"], + "assets": ["pyproject.toml"], "message": "Release v${nextRelease.version} [skip ci]" }] ], diff --git a/prepare_release.sh b/prepare_release.sh index dd8e418f7..36ad39bb4 100755 --- a/prepare_release.sh +++ b/prepare_release.sh @@ -1,3 +1 @@ poetry version $1 -dephell deps convert -poetry run black setup.py diff --git a/pyproject.toml b/pyproject.toml index 403484362..95840e6ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,10 +82,6 @@ exclude = ''' ) ''' -[tool.dephell.main] -from = { format = "poetry", path = "pyproject.toml" } -to = { format = "setuppy", path = "setup.py" } - [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" diff --git a/setup.py b/setup.py deleted file mode 100644 index 680be2ef1..000000000 --- a/setup.py +++ /dev/null @@ -1,91 +0,0 @@ -# -*- coding: utf-8 -*- - -# DO NOT EDIT THIS FILE! -# This file has been autogenerated by dephell <3 -# https://github.com/dephell/dephell - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -import os.path - -readme = "" -here = os.path.abspath(os.path.dirname(__file__)) -readme_path = os.path.join(here, "README.rst") -if os.path.exists(readme_path): - with open(readme_path, "rb") as stream: - readme = stream.read().decode("utf8") - -setup( - long_description=readme, - name="pyquil", - version="3.1.0-rc.4", - description="A Python library for creating Quantum Instruction Language (Quil) programs.", - python_requires="==3.*,>=3.7.0", - project_urls={ - "documentation": "https://pyquil-docs.rigetti.com", - "repository": "https://github.com/rigetti/pyquil.git", - }, - author="Rigetti Computing", - author_email="softapps@rigetti.com", - license="Apache-2.0", - keywords="quantum quil programming hybrid", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Operating System :: OS Independent", - ], - packages=[ - "pyquil", - "pyquil._parser", - "pyquil.api", - "pyquil.compatibility", - "pyquil.compatibility.v2", - "pyquil.compatibility.v2.api", - "pyquil.experiment", - "pyquil.external", - "pyquil.latex", - "pyquil.quantum_processor", - "pyquil.quantum_processor.transformers", - "pyquil.simulation", - ], - package_dir={"": "."}, - package_data={"pyquil": ["*.typed"], "pyquil._parser": ["*.lark", "*.md"], "pyquil.external": ["*.md"]}, - install_requires=[ - 'importlib-metadata==3.*,>=3.7.3; python_version < "3.8"', - "lark==0.*,>=0.11.1", - "networkx==2.*,>=2.5.0", - "numpy==1.*,>=1.20.0", - "qcs-api-client<0.13.0,>=0.8.1", - "retry==0.*,>=0.9.2", - "rpcq==3.*,>=3.6.0", - "scipy==1.*,>=1.6.1", - ], - extras_require={ - "dev": [ - "black==20.*,>=20.8.0.b1", - "flake8==3.*,>=3.8.1", - "mypy==0.740", - "pytest==6.*,>=6.2.2", - "pytest-cov==2.*,>=2.11.1", - "pytest-freezegun==0.*,>=0.4.2", - "pytest-mock==3.*,>=3.6.1", - "pytest-rerunfailures==9.*,>=9.1.1", - "pytest-timeout==1.*,>=1.4.2", - "pytest-xdist==2.*,>=2.2.1", - "respx==0.*,>=0.15.0", - ], - "docs": [ - "nbsphinx==0.*,>=0.8.6", - "recommonmark==0.*,>=0.7.1", - "sphinx==4.*,>=4.0.2", - "sphinx-rtd-theme==0.*,>=0.5.2", - ], - "latex": ["ipython==7.*,>=7.21.0"], - }, -)