# Path: pyp2rpm/version.py



import sys
from pyp2rpm.version import version
from setuptools import setup
from setuptools.command.build_py import build_py as _build_py
        from subprocess import call
        from shutil import copy




description = """Convert Python packages to RPM SPECFILES. The packages can be downloaded from
PyPI and the produced SPEC is in line with Fedora Packaging Guidelines or Mageia Python Policy.

Users can provide their own templates for rendering the package metadata. Both the package
source and metadata can be extracted from PyPI or from local filesystem (local file doesn't
provide that much information though)."""

class build_py(_build_py):
    def run(self):
        # Run the normal build process
        _build_py.run(self)
        # Build test data
        call([sys.executable, 'setup.py', 'sdist'],
             cwd='tests/test_data/isholiday-0.1')
        copy('tests/test_data/isholiday-0.1/dist/isholiday-0.1.tar.gz',
             'tests/test_data/')
        call([sys.executable, 'setup.py', 'sdist'],
             cwd='tests/test_data/utest')
        copy('tests/test_data/utest/dist/utest-0.1.0.tar.gz',
             'tests/test_data/')

setup(
    cmdclass={
        'build_py': build_py,
    },
    name='pyp2rpm',

# Path: pyp2rpm/version.py



# Path: setup.py
import sys
from pyp2rpm.version import version
from setuptools import setup
from setuptools.command.build_py import build_py as _build_py
        from subprocess import call
        from shutil import copy





description = """Convert Python packages to RPM SPECFILES. The packages can be downloaded from
PyPI and the produced SPEC is in line with Fedora Packaging Guidelines or Mageia Python Policy.

Users can provide their own templates for rendering the package metadata. Both the package
source and metadata can be extracted from PyPI or from local filesystem (local file doesn't
provide that much information though)."""

class build_py(_build_py):
    def run(self):
        # Run the normal build process
        _build_py.run(self)
        # Build test data
        call([sys.executable, 'setup.py', 'sdist'],
             cwd='tests/test_data/isholiday-0.1')
        copy('tests/test_data/isholiday-0.1/dist/isholiday-0.1.tar.gz',
             'tests/test_data/')
        call([sys.executable, 'setup.py', 'sdist'],
             cwd='tests/test_data/utest')
        copy('tests/test_data/utest/dist/utest-0.1.0.tar.gz',
             'tests/test_data/')

setup(
    cmdclass={
        'build_py': build_py,
    },
    name='pyp2rpm',

    version=version,