-
Notifications
You must be signed in to change notification settings - Fork 658
Migrating setup.py to pyproject.toml #7375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
runora95
wants to merge
31
commits into
master
Choose a base branch
from
set-pyproj
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
dc3a72f
Migrating setup.py to pyproject.toml
runora95 082b21c
Merge branch 'master' into set-pyproj
runora95 97c48c5
fixed typo
runora95 c18d0ee
Adding numpy to toml
runora95 aa722ae
removing numpy
runora95 c1c4e24
updated pyproj
runora95 0c67ce2
Merge branch 'master' into set-pyproj
runora95 be86236
removed packages find
runora95 02f2790
Trigger Build
runora95 e099c96
removed setup.py
runora95 ce34142
added tools dynamic
runora95 59a0df4
Trigger Build
runora95 e1fda00
setup.py
runora95 fc3a1c2
Merge branch 'master' into set-pyproj
runora95 f6326a5
update dockerfile
runora95 616de65
remove setup.py
runora95 668bcf9
Merge branch 'master' into set-pyproj
runora95 58eab8e
Moving setup.py to bacup file
runora95 6330f0d
changing to setup-dev
runora95 adf55ea
changed setup.py
runora95 e646c88
Moved license in toml
runora95 d1f8dee
Merge branch 'master' into set-pyproj
runora95 afb7914
fixed licence in classifiers
runora95 3c17400
updated changelog-dev
runora95 bccd638
Update doc/releases/changelog-dev.md
runora95 53cf7ba
removing cmake
runora95 ff431ab
Merge branch 'master' into set-pyproj
runora95 61406ed
clearing setup.py
runora95 057539f
updating requires
runora95 f6eedec
Merge branch 'master' into set-pyproj
runora95 432a0c6
Merge branch 'master' into set-pyproj
runora95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,83 @@ | ||
[build-system] | ||
requires = ["setuptools>=75.8.1"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "Pennylane" | ||
description = "PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network." | ||
readme = "README.md" | ||
license = "Apache-2.0" | ||
requires-python = ">=3.10" | ||
dynamic = ["version"] | ||
dependencies = [ | ||
"scipy", | ||
"networkx", | ||
"rustworkx>=0.14.0", | ||
"autograd", | ||
"appdirs", | ||
"autoray>=0.6.11", | ||
"cachetools", | ||
"pennylane-lightning>=0.41", | ||
"requests", | ||
"tomli", | ||
"typing_extensions", | ||
"packaging", | ||
"diastatic-malt", | ||
"numpy" | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
[[project.maintainers]] | ||
name = "Xanadu Quantum Technologies Inc." | ||
email = "[email protected]" | ||
|
||
[project.urls] | ||
repository = "https://github.com/PennyLaneAI/pennylane" | ||
|
||
[project.optional-dependencies] | ||
kernels = ["cvxpy", "cvxopt"] | ||
|
||
[project.scripts] | ||
pl-device-test = "pennylane.devices.tests:cli" | ||
|
||
[project.entry-points."pennylane.plugins"] | ||
"default.qubit" = "pennylane.devices:DefaultQubit" | ||
"default.gaussian" = "pennylane.devices:DefaultGaussian" | ||
"default.mixed" = "pennylane.devices.default_mixed:DefaultMixed" | ||
"reference.qubit" = "pennylane.devices.reference_qubit:ReferenceQubit" | ||
"null.qubit" = "pennylane.devices.null_qubit:NullQubit" | ||
"default.qutrit" = "pennylane.devices.default_qutrit:DefaultQutrit" | ||
"default.clifford" = "pennylane.devices.default_clifford:DefaultClifford" | ||
"default.qutrit.mixed" = "pennylane.devices.default_qutrit_mixed:DefaultQutritMixed" | ||
"default.tensor" = "pennylane.devices.default_tensor:DefaultTensor" | ||
|
||
[tool.setuptools] | ||
include-package-data = true | ||
py-modules = [] | ||
|
||
[tool.setuptools.dynamic] | ||
version = {attr = "pennylane._version.__version__"} | ||
|
||
[tool.setuptools_scm] | ||
|
||
[tool.setuptools.package-data] | ||
pennylane = ["devices/tests/pytest.ini", "drawer/plot.mplstyle"] | ||
|
||
[tool.black] | ||
line-length = 100 | ||
include = '\.pyi?$' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,3 @@ | ||
# Copyright 2018-2024 Xanadu Quantum Technologies Inc. | ||
|
||
# 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. | ||
|
||
"""Setup file for package installation.""" | ||
# pylint: disable=unspecified-encoding, consider-using-with | ||
|
||
from setuptools import find_packages, setup | ||
|
||
with open("pennylane/_version.py") as f: | ||
version = f.readlines()[-1].split()[-1].strip("\"'") | ||
|
||
requirements = [ | ||
"numpy", | ||
"scipy", | ||
"networkx", | ||
"rustworkx>=0.14.0", | ||
"autograd", | ||
"tomlkit", | ||
"appdirs", | ||
"autoray>=0.6.11", | ||
"cachetools", | ||
"pennylane-lightning>=0.41", | ||
"requests", | ||
"typing_extensions", | ||
"packaging", | ||
"diastatic-malt", | ||
] | ||
|
||
info = { | ||
"name": "PennyLane", | ||
"version": version, | ||
"maintainer": "Xanadu Inc.", | ||
"maintainer_email": "[email protected]", | ||
"url": "https://github.com/PennyLaneAI/pennylane", | ||
"license": "Apache License 2.0", | ||
"packages": find_packages(where="."), | ||
"entry_points": { | ||
# TODO: rename entry point 'pennylane.plugins' to 'pennylane.devices'. | ||
# This requires a rename in the setup file of all devices, and is best done during another refactor | ||
"pennylane.plugins": [ | ||
"default.qubit = pennylane.devices:DefaultQubit", | ||
"default.gaussian = pennylane.devices:DefaultGaussian", | ||
"default.mixed = pennylane.devices.default_mixed:DefaultMixed", | ||
"reference.qubit = pennylane.devices.reference_qubit:ReferenceQubit", | ||
"null.qubit = pennylane.devices.null_qubit:NullQubit", | ||
"default.qutrit = pennylane.devices.default_qutrit:DefaultQutrit", | ||
"default.clifford = pennylane.devices.default_clifford:DefaultClifford", | ||
"default.qutrit.mixed = pennylane.devices.default_qutrit_mixed:DefaultQutritMixed", | ||
"default.tensor = pennylane.devices.default_tensor:DefaultTensor", | ||
], | ||
"console_scripts": ["pl-device-test=pennylane.devices.tests:cli"], | ||
}, | ||
"description": "PennyLane is a cross-platform Python library for quantum computing, quantum machine learning, and quantum chemistry. Train a quantum computer the same way as a neural network.", | ||
"long_description": open("README.md").read(), | ||
"long_description_content_type": "text/markdown", | ||
"provides": ["pennylane"], | ||
"install_requires": requirements, | ||
"extras_require": {"kernels": ["cvxpy", "cvxopt"]}, | ||
"package_data": {"pennylane": ["devices/tests/pytest.ini", "drawer/plot.mplstyle"]}, | ||
"include_package_data": True, | ||
} | ||
|
||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"Natural Language :: English", | ||
"Operating System :: POSIX", | ||
"Operating System :: MacOS :: MacOS X", | ||
"Operating System :: POSIX :: Linux", | ||
"Operating System :: Microsoft :: Windows", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Topic :: Scientific/Engineering :: Physics", | ||
] | ||
|
||
setup(classifiers=classifiers, **(info)) | ||
setup() |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup.py had a TODO message on the entry points, let's keep it here as well