Minimum Python version is now 3.3

This commit is contained in:
Virgil Dupras 2013-12-07 17:23:18 -05:00
parent c7c7a73384
commit 3e42ad8469
6 changed files with 12 additions and 27 deletions

View File

@ -46,7 +46,7 @@ and follow instructions from the script. You can then ignore the rest of the bui
Prerequisites are installed through `pip`. However, some of them are not "pip installable" and have
to be installed manually.
* All systems: [Python 3.2+][python] and [setuptools][setuptools]
* All systems: [Python 3.3+][python] and [setuptools][setuptools]
* Mac OS X: The last XCode to have the 10.6 SDK included.
* Windows: Visual Studio 2008, [PyQt 4.7+][pyqt], [cx_Freeze][cxfreeze] and
[Advanced Installer][advinst] (you only need the last two if you want to create an installer)
@ -55,17 +55,16 @@ On Ubuntu, the apt-get command to install all pre-requisites is:
$ apt-get install python3-dev python3-pyqt4 pyqt4-dev-tools python3-setuptools
## Virtualenv setup
## Setting up the virtual environment
First, you need `pip` and `virtualenv` in your system Python install:
Use Python's built-in `pyvenv` to create a virtual environment in which we're going to install our.
Python-related dependencies. `pyvenv` is built-in Python but, unlike its `virtualenv` predecessor,
it doesn't install setuptools and pip, so it has to be installed manually:
$ sudo easy_install pip
$ sudo pip install virtualenv
Then, in dupeGuru's source folder, create a virtual environment and activate it:
$ virtualenv --system-site-packages env
$ pyvenv --system-site-packages env
$ source env/bin/activate
$ wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
$ easy_install pip
Then, you can install pip requirements in your virtualenv:
@ -73,17 +72,6 @@ Then, you can install pip requirements in your virtualenv:
([osx|win] depends, of course, on your platform. On other platforms, just use requirements.txt).
## Alternative: pyvenv
If you're on Python 3.3+, you can use the built-in `pyvenv` instead of `virtualenv`. `pyvenv` is
pretty much the same thing as `virtualenv`, except that it doesn't install setuptools and pip, so it
has to be installed manually:
$ pyvenv --system-site-packages env
$ source env/bin/activate
$ wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python
$ easy_install pip
## Actual building and running
With your virtualenv activated, you can build and run dupeGuru with these commands:

View File

@ -19,7 +19,7 @@ from setuptools import setup, Extension
from hscommon import sphinxgen
from hscommon.build import (add_to_pythonpath, print_and_do, copy_packages, filereplace,
get_module_version, move_all, copy_sysconfig_files_for_embed, copy_all, OSXAppStructure,
get_module_version, move_all, copy_all, OSXAppStructure,
build_cocoalib_xibless, fix_qt_resource_file, build_cocoa_ext, copy_embeddable_python_dylib,
collect_stdlib_dependencies, copy)
from hscommon import loc
@ -123,7 +123,6 @@ def build_cocoa(edition, dev):
del sys.path[0]
# Views are not referenced by python code, so they're not found by the collector.
copy_all('build/inter/*.so', op.join(pydep_folder, 'inter'))
copy_sysconfig_files_for_embed(pydep_folder)
if not dev:
# Important: Don't ever run delete_files_with_pattern('*.py') on dev builds because you'll
# be deleting all py files in symlinked folders.

View File

@ -150,8 +150,6 @@ class DupeGuruME(DupeGuruBase):
self.dead_tracks = []
def _do_delete(self, j, *args):
# XXX If I read correctly, Python 3.3 will allow us to go fetch inner function easily, so
# we'll be able to replace "op" below with DupeGuruBase._do_delete.op.
def op(dupe):
j.add_progress()
return self._do_delete_dupe(dupe, *args)

View File

@ -31,7 +31,7 @@ def configure(conf):
os.symlink('../build/Python', versioned_dylib_path)
# The rest is standard WAF code that you can find the the python and macapp demos.
conf.load('compiler_c python')
conf.check_python_version((3,2,0))
conf.check_python_version((3,3,0))
conf.check_python_headers()
conf.env.FRAMEWORK_COCOA = 'Cocoa'
conf.env.ARCH_COCOA = ['x86_64']

2
debian/control vendored
View File

@ -8,5 +8,5 @@ Homepage: http://www.hardcoded.net
Package: {pkgname}
Architecture: {arch}
Depends: python3 (>=3.2), python3-pyqt4
Depends: python3 (>=3.3), python3-pyqt4
Description: {longname}

View File

@ -136,7 +136,7 @@ def package_debian_distribution(edition, distribution):
def package_debian(edition):
print("Packaging for Ubuntu")
for distribution in ['precise', 'quantal', 'raring', 'saucy']:
for distribution in ['raring', 'saucy']:
package_debian_distribution(edition, distribution)
def package_arch(edition):