Page MenuHomePhabricator

Install python-mwclient on Stretch grid nodes
Closed, ResolvedPublic

Description

As of this moment I am still not able to use the python packages on Stretch grid - I was unable to "import mwclient" in the system default installation of python:

tools.wcam-bot@tools-sgebastion-07:~$ which python
/usr/bin/python
tools.wcam-bot@tools-sgebastion-07:~$ python
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mwclient
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mwclient

Is there anything further to do?

In T215605: cloudvps: missing packages in stretch for cloudcontrol servers this package was added to the main Wikimedia apt repo, but it apparently not exposed to the Toolforge grid exec nodes:

$ ssh cloudcontrol1003.wikimedia.org
$ $ apt-cache show python-mwclient
Package: python-mwclient
Source: mwclient
Version: 0.8.4-1
Architecture: all
Maintainer: Bryan Tong Minh <bryan.tongminh@gmail.com>
Installed-Size: 128
Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-requests-oauthlib, python-six
Priority: optional
Section: python
Filename: pool/openstack-mitaka-jessie/m/mwclient/python-mwclient_0.8.4-1_all.deb
Size: 21738
SHA256: 6d5d35e5ae0da75af8f50b1ce5647fcfe0ee56b6a727dcd5902d66f94775df7b
SHA1: 8b1d676e2539497c87baa48b844c5c66a436bf9e
MD5sum: 3c180feb278629dea0a4a57c34788dec
Description: MediaWiki API client
 .
 .. figure:: docs/source/logo.png
    :alt: Logo
    :align: center
 .
 mwclient
 ========
 .
 .. image:: https://img.shields.io/travis/mwclient/mwclient.svg
    :target: https://travis-ci.org/mwclient/mwclient
    :alt: Build status
 .
 .. image:: https://img.shields.io/coveralls/mwclient/mwclient.svg
    :target: https://coveralls.io/r/mwclient/mwclient
    :alt: Test coverage
 .
 .. image:: https://landscape.io/github/mwclient/mwclient/master/landscape.svg?style=flat
    :target: https://landscape.io/github/mwclient/mwclient/master
    :alt: Code health
Description-md5: 0548ae120685a8b54f72a7546d78ac47
$ ssh login.tools.wmflabs.org
$ apt-cache show python-mwclient
N: Unable to locate package python-mwclient
E: No packages found

I don't think we really want to add the 'openstack-mitaka-jessie' component on these hosts just to get this library, so we need to find it somewhere else or add it to Toolforge's aptly repo.

Event Timeline

Wasn't it also added to the thirdparty component? If that makes a difference?

Change 496258 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/puppet@production] toolforge: install python-mwclient with grid exec_environ

https://gerrit.wikimedia.org/r/496258

@Andrew did the needful in the APT repo to expose this package in the 'main' component of our 'wikimedia-stretch' distribution.

$ apt-cache show python-mwclient
Package: python-mwclient
Source: mwclient
Version: 0.8.4-1
Architecture: all
Maintainer: Bryan Tong Minh <bryan.tongminh@gmail.com>
Installed-Size: 128
Depends: python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), python-requests-oauthlib, python-six
Priority: optional
Section: python
Filename: pool/main/m/mwclient/python-mwclient_0.8.4-1_all.deb
Size: 21738
SHA256: 6d5d35e5ae0da75af8f50b1ce5647fcfe0ee56b6a727dcd5902d66f94775df7b
SHA1: 8b1d676e2539497c87baa48b844c5c66a436bf9e
MD5sum: 3c180feb278629dea0a4a57c34788dec
Description: MediaWiki API client
 .
 .. figure:: docs/source/logo.png
    :alt: Logo
    :align: center
 .
 mwclient
 ========
 .
 .. image:: https://img.shields.io/travis/mwclient/mwclient.svg
    :target: https://travis-ci.org/mwclient/mwclient
    :alt: Build status
 .
 .. image:: https://img.shields.io/coveralls/mwclient/mwclient.svg
    :target: https://coveralls.io/r/mwclient/mwclient
    :alt: Test coverage
 .
 .. image:: https://landscape.io/github/mwclient/mwclient/master/landscape.svg?style=flat
    :target: https://landscape.io/github/mwclient/mwclient/master
    :alt: Code health
Description-md5: 0548ae120685a8b54f72a7546d78ac47

Change 496258 merged by Andrew Bogott:
[operations/puppet@production] toolforge: install python-mwclient with grid exec_environ

https://gerrit.wikimedia.org/r/496258

bd808 assigned this task to Andrew.
$ ssh login.tools.wmflabs.org
$ python
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mwclient
>>> help(mwclient)
Help on package mwclient:

NAME
    mwclient - Copyright (c) 2006-2011 Bryan Tong Minh

FILE
    /usr/lib/python2.7/dist-packages/mwclient/__init__.py

DESCRIPTION
    Permission is hereby granted, free of charge, to any person
    obtaining a copy of this software and associated documentation
    files (the "Software"), to deal in the Software without
    restriction, including without limitation the rights to use,
    copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the
    Software is furnished to do so, subject to the following
    conditions:

    The above copyright notice and this permission notice shall be
    included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
    OTHER DEALINGS IN THE SOFTWARE.

PACKAGE CONTENTS
    client
    errors
    ex
    image
    listing
    page
    sleep
    util

DATA
    __ver__ = '0.8.4'


>>>