Skip to content

Commit

Permalink
Removed requirements from setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
shahidee44 committed Mar 21, 2023
1 parent c1fb5c9 commit 1e7b778
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 42 deletions.
4 changes: 3 additions & 1 deletion scripts/push_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ for entry in "${modulesList[@]}"; do
echo "processing $entry/setup.py"
cd $entry
pip install .
python -m build
# python -m build
python3 setup.py -q sdist
python3 setup.py -q bdist_wheel
twine upload --repository testpypi dist/* --username $1 --password $2
cd "../.."
done
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
with open("README.md", "r") as fh:
long_description = fh.read()

with open("src/openqaoa-core/_version.py") as f:
with open("src/openqaoa-core/openqaoa/_version.py") as f:
version = f.readlines()[-1].split()[-1].strip("\"'")

requirements = [
Expand Down
5 changes: 5 additions & 0 deletions src/openqaoa-azure/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
azure-quantum
qdk
qiskit-qir
qiskit-ionq
azure-quantum[qiskit]
12 changes: 6 additions & 6 deletions src/openqaoa-azure/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

requirements = [
"openqaoa-core=={}".format(version),
"openqaoa-qiskit=={}".format(version),
"azure-quantum",
"qdk",
"qiskit-qir",
"qiskit-ionq",
"azure-quantum[qiskit]",
"openqaoa-qiskit=={}".format(version)
]

add_requirements = open('requirements.txt').readlines()
add_requirements = [r.strip() for r in add_requirements]

requirements.append(add_requirements)

setup(
name="openqaoa-azure",
python_requires=">=3.8, <3.11",
Expand Down
1 change: 1 addition & 0 deletions src/openqaoa-braket/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
amazon-braket-sdk>=1.23.0
6 changes: 5 additions & 1 deletion src/openqaoa-braket/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@

requirements = [
"openqaoa-core=={}".format(version),
"amazon-braket-sdk>=1.23.0",
]

add_requirements = open('requirements.txt').readlines()
add_requirements = [r.strip() for r in add_requirements]

requirements.append(add_requirements)

setup(
name="openqaoa-braket",
python_requires=">=3.8, <3.11",
Expand Down
11 changes: 11 additions & 0 deletions src/openqaoa-core/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
pandas>=1.3.5
sympy>=1.10.1
numpy>=1.22.3
networkx>=2.8
matplotlib>=3.4.3
scipy>=1.8
docplex>=2.23.1
autograd>=1.4
semantic_version>=2.10
autoray>=0.3.1
requests
6 changes: 6 additions & 0 deletions src/openqaoa-core/requirements_docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sphinx>=4.5.0
sphinx-autodoc-typehints>=1.18.1
sphinx-rtd-theme>=1.0.0
nbsphinx>=0.8.9
ipython>=8.10.0
nbconvert>=6.5.1
7 changes: 7 additions & 0 deletions src/openqaoa-core/requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
pytest>=7.1.0
pytest-cov>=3.0.0
ipython>=8.2.0
nbconvert>=6.5.1
pandas>=1.4.3
plotly>=5.9.0
cplex>=22.1.0.0
38 changes: 7 additions & 31 deletions src/openqaoa-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,15 @@

with open("openqaoa/_version.py") as f:
version = f.readlines()[-1].split()[-1].strip("\"'")

requirements = open('requirements.txt').readlines()
requirements = [r.strip() for r in requirements]

requirements = [
"pandas>=1.3.5",
"sympy>=1.10.1",
"numpy>=1.22.3",
"networkx>=2.8",
"matplotlib>=3.4.3",
"scipy>=1.8",
"docplex>=2.23.1",
"autograd>=1.4",
"semantic_version>=2.10",
"autoray>=0.3.1",
"requests",
]
requirements_docs = open('requirements_docs.txt').readlines()
requirements_docs = [r.strip() for r in requirements_docs]

requirements_docs = [
"sphinx>=4.5.0",
"sphinx-autodoc-typehints>=1.18.1",
"sphinx-rtd-theme>=1.0.0",
"nbsphinx>=0.8.9",
"ipython>=8.10.0",
"nbconvert>=6.5.1",
]

requirements_test = [
"pytest>=7.1.0",
"pytest-cov>=3.0.0",
"ipython>=8.2.0",
"nbconvert>=6.5.1",
"pandas>=1.4.3",
"plotly>=5.9.0",
"cplex>=22.1.0.0",
]
requirements_test = open('requirements_test.txt').readlines()
requirements_test = [r.strip() for r in requirements_test]

setup(
name="openqaoa-core",
Expand Down
1 change: 1 addition & 0 deletions src/openqaoa-pyquil/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyquil>=3.1.0
6 changes: 5 additions & 1 deletion src/openqaoa-pyquil/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@

requirements = [
"openqaoa-core=={}".format(version),
"pyquil>=3.1.0",
]

add_requirements = open('requirements.txt').readlines()
add_requirements = [r.strip() for r in add_requirements]

requirements.append(add_requirements)

setup(
name="openqaoa-pyquil",
python_requires=">=3.8, <3.11",
Expand Down
1 change: 1 addition & 0 deletions src/openqaoa-qiskit/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
qiskit>=0.36.1
6 changes: 5 additions & 1 deletion src/openqaoa-qiskit/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@

requirements = [
"openqaoa-core=={}".format(version),
"qiskit>=0.36.1",
]

add_requirements = open('requirements.txt').readlines()
add_requirements = [r.strip() for r in add_requirements]

requirements.append(add_requirements)

setup(
name="openqaoa-qiskit",
python_requires=">=3.8, <3.11",
Expand Down

0 comments on commit 1e7b778

Please sign in to comment.