Skip to content

Commit 7045406

Browse files
committed
add dependencies
1 parent b3737f0 commit 7045406

File tree

2 files changed

+10
-59
lines changed

2 files changed

+10
-59
lines changed

README.rst

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -23,71 +23,17 @@ Requirements
2323
Installation
2424
--------------
2525

26-
Install Cython (optional)
27-
+++++++++++++++++++++++++
28-
29-
Installation of Cython is optional.
30-
CyMySQL will run faster if installed, but will also run without it.
31-
32-
Since the bottleneck is often in MySQL queries, installing Cython may not be effective in many cases.
33-
34-
For most versions of pip and setuptools installation of Cython is not
35-
required as it's listed in pyproject.tompl as a required build-time
36-
dependency and will be installed automatically in the isolated build
37-
environemnt. This means it's not possible to install CyMySQL in
38-
pure-Python mode without cythonized extensions.
39-
40-
For older versions of pip and setuptools that don't obey pyproject.tompl
41-
install Cython yourself:
26+
With cythonize
4227

4328
::
4429

45-
# pip install cython
30+
$ pip install cymysql
4631

47-
Install cymysql
48-
++++++++++++++++++++++++++++++
32+
Or without cythonize
4933

5034
::
5135

52-
# pip install cymysql
53-
54-
Install pycryptodome(depending on a situation)
55-
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
56-
57-
::
58-
59-
# pip install pycryptodome
60-
61-
If you use caching_sha2_password authentication plugin and connect with 'not ssl and not unix_socket',
62-
it means that if the following error occur ...
63-
64-
::
65-
66-
ModuleNotFoundError: No module named 'Crypto'
67-
68-
you shoud install pycryptodome.
69-
70-
Install pyzstd (compress="zstd")
71-
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
72-
73-
::
74-
75-
# pip install pyzstd
76-
77-
connect() has a `compress` parameter, and it can be set either "zlib" or "zstd".
78-
79-
If "zstd" is specified, `pyzstd` must be installed.
80-
81-
Install numpy (VECTOR type)
82-
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
83-
84-
::
85-
86-
# pip install numpy
87-
88-
If you fetch a VECTOR type (MySQL 9.0), you can get the result in ndarray.
89-
90-
The value type returned by the VECTOR type may change in future versions of CyMySQL.
36+
$ NO_CYTHON=1 pip instal cymysql
9137

9238
Example
9339
---------------

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ authors = [
1313
maintainers = [
1414
{ name = "Hajime Nakagami", email = "nakagami@gmail.com" }
1515
]
16-
dependencies = []
16+
dependencies = ["pycryptodome", "pyzstd"]
1717
classifiers = [
1818
'Development Status :: 4 - Beta',
1919
'Operating System :: OS Independent',
@@ -25,6 +25,11 @@ classifiers = [
2525
]
2626
dynamic = ["version"]
2727

28+
[project.optional-dependencies]
29+
"vector" = [
30+
"numpy"
31+
]
32+
2833
[project.urls]
2934
"Project" = "https://github.com/nakagami/CyMySQL/"
3035

0 commit comments

Comments
 (0)