1

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

Toni Pizà
Details
Message ID
<575518E3.9070801@habitissimo.com>
Sender timestamp
1465194723
DKIM signature
missing
Download raw message
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:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa
Details
Message ID
<20160606095839.39e212c7@ncopa-desktop.alpinelinux.org>
In-Reply-To
<575518E3.9070801@habitissimo.com> (view parent)
Sender timestamp
1465199919
DKIM signature
missing
Download raw message
On Mon, 6 Jun 2016 08:32:03 +0200
Toni Pizà <tpiza@habitissimo.com> wrote:

> 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

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

Thanks!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---