~mterry/duplicity/2.6isms

« back to all changes in this revision

Viewing changes to dist/makedist

  • Committer: Kenneth Loafman
  • Date: 2014-04-17 17:35:16 UTC
  • mfrom: (967.2.4 nosetests)
  • Revision ID: kenneth@loafman.com-20140417173516-ns4vq8z9vdz1lbqe
* Merged in lp:~mterry/duplicity/modern-testing
  - Enable/use more modern testing tools like nosetests and tox as well as more
    common setup.py hooks like test and sdist.
  - Specifically:
    * move setup.py to toplevel where most tools and users expect it
    * Move and adjust test files to work when running "nosetests" in toplevel
      directory. Specifically, do a lot more of the test setup in
      tests/__init__.py rather than the run-tests scripts
    * Add small tox.ini file for using tox, which is a wrapper for using
      virtualenv. Only enable for py26 and py27 right now, since modern
      setuptools dropped support for <2.6 (and tox 1.7 recently dropped <2.6)
    * Add setup.py hooks for test and sdist which are both standard targets
      (sdist just outsources to dist/makedist right now)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import os, re, shutil, time, sys, subprocess
24
24
 
25
25
SourceDir = "duplicity"
26
 
DistDir = "dist"
27
26
 
28
27
# Various details about the files must also be specified by the rpm
29
28
# spec template.
89
88
                  os.path.join(tardir, "bin", "duplicity.1"))
90
89
    VersionedCopy(os.path.join("bin", "rdiffdir.1"),
91
90
                  os.path.join(tardir, "bin", "rdiffdir.1"))
92
 
    VersionedCopy(os.path.join(DistDir, "setup.py"),
 
91
    VersionedCopy("setup.py",
93
92
                  os.path.join(tardir, "setup.py"))
94
93
 
95
94
    # make sure executables are