Subject: [alpine-devel] pip install mysql-python without installing complete mariadb package

From: Toni Pizà <[email-masked]>
Date: Mon, 6 Jun 2016 08:32:03 +0200

HI!

mysql-python relies on mysql_config for its installation. Trying to pip 
install it without the complete mariadb package (where mysql_config is 
found 
https://pkgs.alpinelinux.org/contents?file=mysql_config&path=&name=&branch=edge&repo=main&arch=armhf), 
results on an error:

/app # pip install mysql-python
Collecting mysql-python
   Downloading MySQL-python-1.2.5.zip (108kB)
     100% |████████████████████████████████| 110kB 729kB/s
     Complete output from command python setup.py egg_info:
     sh: mysql_config: not found
     Traceback (most recent call last):
       File "<string>", line 20, in <module>
       File "/tmp/pip-build-GEIJC6/mysql-python/setup.py", line 17, in 
<module>
         metadata, options = get_config()
       File "setup_posix.py", line 43, in get_config
         libs = mysql_config("libs_r")
       File "setup_posix.py", line 25, in mysql_config
         raise EnvironmentError("%s not found" % (mysql_config.path,))
     EnvironmentError: mysql_config not found

     ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in 
/tmp/pip-build-GEIJC6/mysql-python

After installing mariadb-dev package (with mariadb as a dependency) it 
can find mysql_config and succesfully install mysql-python.

On other distros (debian based) its enought to install 
libmysqlclient-dev. The same "problem" occurs with psycopg2 and postgres.

I suggest to rethink the mariadb related package to allow the 
installation of python modules without the need to install the entire 
database server. Thanks a lot!

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Natanael Copa <[email-masked]>
Date: Mon, 6 Jun 2016 09:58:39 +0200

On Mon, 6 Jun 2016 08:32:03 +0200
Toni Pizà <[email-masked]> wrote:

>      100% |********************************| 110kB 729kB/s

This is a bug. mysql_config should be shipped with mariadb-dev package. I'll fix it.

Thanks!

-nc

---