diff --git a/README.md b/README.md index 93cc8838..137f3f0d 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,14 @@ On Arch, it's: $ pacman -S python-pyqt5 +### OS X and pyenv + +[pyenv][pyenv] is a popular way to manage multiple python versions. However, be aware that dupeGuru +will not compile with a pyenv's python unless it's been built with `--enable-framework`. You can do +this with: + + $ env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.4.3 + ## Setting up the virtual environment Use Python's built-in `pyvenv` to create a virtual environment in which we're going to install our. @@ -121,4 +129,4 @@ You can also package dupeGuru into an installable package with: [pyqt]: http://www.riverbankcomputing.com [cxfreeze]: http://cx-freeze.sourceforge.net/ [advinst]: http://www.advancedinstaller.com - +[pyenv]: https://github.com/yyuu/pyenv diff --git a/build.py b/build.py index 86997c55..c25b5968 100644 --- a/build.py +++ b/build.py @@ -70,9 +70,6 @@ def parse_args(): (options, args) = parser.parse_args() return options -def cocoa_compile_command(edition): - return '{0} waf configure --edition {1} && {0} waf'.format(sys.executable, edition) - def cocoa_app(edition): app_path = { 'se': 'build/dupeGuru.app', @@ -160,7 +157,7 @@ def build_cocoa(edition, dev): delete_files_with_pattern(pydep_folder, '__pycache__') print("Compiling with WAF") os.chdir('cocoa') - print_and_do(cocoa_compile_command(edition)) + print_and_do('python2.7 waf configure --edition {} && python2.7 waf'.format(edition)) os.chdir('..') app.copy_executable('cocoa/build/dupeGuru') build_help(edition) diff --git a/hscommon/build.py b/hscommon/build.py index eb0ddd51..1547454e 100644 --- a/hscommon/build.py +++ b/hscommon/build.py @@ -479,6 +479,8 @@ def build_cocoa_ext(extname, dest, source_files, extra_frameworks=(), extra_incl extra_link_args += ['-framework', extra] ext = Extension(extname, source_files, extra_link_args=extra_link_args, include_dirs=extra_includes) setup(script_args=['build_ext', '--inplace'], ext_modules=[ext]) - fn = extname + '.so' + # Our problem here is to get the fully qualified filename of the resulting .so but I couldn't + # find a documented way to do so. The only thing I could find is this below :( + fn = ext._file_name assert op.exists(fn) move(fn, op.join(dest, fn))