Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: paylogic/py2deb
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.6.0
Choose a base ref
...
head repository: paylogic/py2deb
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.6.1
Choose a head ref
  • 1 commit
  • 4 files changed
  • 1 contributor

Commits on Jun 24, 2013

  1. Version Bump. Updated TODO List, Added sanity check

    Arjan Verwer committed Jun 24, 2013

    Verified

    This commit was signed with the committer’s verified signature.
    denis256 Denis O
    Copy the full SHA
    d39507f View commit details
Showing with 14 additions and 10 deletions.
  1. +4 −6 TODO.rst
  2. +1 −1 py2deb/__init__.py
  3. +8 −2 py2deb/converter.py
  4. +1 −1 setup.py
10 changes: 4 additions & 6 deletions TODO.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
To-do list for the Python to Debian converter
=============================================

- Use ``logging.RotatingFileHandler`` to write logs to a file.
- Add confirmation for installation of non-python dependencies *and* add a command to auto-confirm everything (--yes)
- Use sanity_check_dependencies() from pip_accel.deps.
``None``

Ideas
-----
- Make custom exception(s)
- Support "extra" requirements (optional dependencies, like suggests/enhances)
- Command-line option: Create config template in current directory.
- Custom Exception?
- Support "extra" requirements (optional dependencies, like suggests/enhances)?
- Command-line option: Create config template in current directory?
2 changes: 1 addition & 1 deletion py2deb/__init__.py
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ def main():

# Start converting
converted = convert(pip_args, config_file=config_file, auto_install=auto_install,
verbose=verbose, cleanup=False)
verbose=verbose, cleanup=True)

if print_dependencies:
print ', '.join(converted)
10 changes: 8 additions & 2 deletions py2deb/converter.py
Original file line number Diff line number Diff line change
@@ -56,7 +56,7 @@ def convert(pip_args, auto_install=False, verbose=False, config_file=None, clean
patch_rules(package)
patch_control(package, replacements, config)
apply_script(package, config, verbose)
# TODO: pip-accel sanity check
sanity_check_dependencies(package, auto_install)
debfile = build(package, repository, verbose)
logger.info('%s has been converted to %s', package.name, package.debian_name)
converted.append('%(Package)s (=%(Version)s)' % debfile.debcontrol())
@@ -94,7 +94,7 @@ def get_required_packages(pip_args, prefix, replacements):
if pkg_name not in to_ignore:
yield package
else:
logger.debug('%s is in the ignore list and will not be build.', pkg_name)
logger.info('%s is in the ignore list and will not be build.', pkg_name)

def get_related_packages(pkg_name, packages):
"""
@@ -228,6 +228,12 @@ def apply_script(package, config, verbose):

logger.info('The script has been applied.')

def sanity_check_dependencies(package, auto_install):
logger.debug('Performing a sanity check on %s', package.name)
result = pip_accel.deps.sanity_check_dependencies(package.name)
assert result, 'Failed sanity check on %s' % package.name
logger.debug('Sanity check completed')

def build(package, repository, verbose):
"""
Builds the debian package using dpkg-buildpackage.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
from setuptools import setup, find_packages

setup(name='pl-py2deb',
version='0.6.0',
version='0.6.1',
description='A tool to convert python packages to debian packages.',
author='Arjan Verwer',
author_email='arjan.verwer@paylogic.eu',