author Julien Cristau <>
Thu, 28 May 2015 01:13:28 +0200
changeset 761 d9762b5a4604
parent 748 c97f90cd49c5
child 764 d5a8b1744cfa
permissions -rw-r--r--
[pkg] Use setuptools Move sources to a 'rql' subdirectory, drop the NO_SETUPTOOLS code path (essentially rewriting all of This avoids a conflict between our and the stdlib when running Closes #278637.

#!/usr/bin/env python
# pylint: disable-msg=W0404,W0622,W0704,W0613,E0611,C0103
# copyright 2004-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact --
# This file is part of rql.
# rql is free software: you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 2.1 of the License, or (at your option)
# any later version.
# rql is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
# details.
# You should have received a copy of the GNU Lesser General Public License along
# with rql. If not, see <>.
"""Generic Setup script, takes package info from file.

from setuptools import setup, find_packages
from io import open
from os import path

here = path.abspath(path.dirname(__file__))

pkginfo = {}
with open(path.join(here, '')) as f:
    exec(, pkginfo)

# Get the long description from the relevant file
with open(path.join(here, 'README'), encoding='utf-8') as f:
    long_description =

kwargs = {}
if 'subpackage_of' in pkginfo:
    kwargs['namespace_packages'] = [pkginfo['subpackage_of']],

    name=pkginfo.get('distname', pkginfo['modname']),
    # See
    classifiers=pkginfo.get('classifiers', []),
    packages=find_packages(exclude=['contrib', 'docs', 'test*']),
    scripts=pkginfo.get('scripts', []),