Take the 2-minute tour ×
Code Review Stack Exchange is a question and answer site for peer programmer code reviews. It's 100% free, no registration required.

I have a small project that requires a third-party module that's rarely updated (once every other year or so) and not maintained by any package management system. The context, here, is cognitive science & research, the third party module is for linking proprietary hardware to custom scripting, in the house project, potentially, may end up seeing wider (eventually open source) use within cog. psych so I want to plan for distribution.

Can anyone poke holes in or thumbs up this approach:

#!/usr/bin/env python

from distutils.core import setup

try:
    import third_party_package
    install_packages = ['in_house_package']
except ImportError:
    print "Warning: 'in_house_pacakge' not found in PYTHON_PATH, installing version in_house_package v. <VERSION>"
    install_packages = ['in_house_package', 'in_house_package.third_party_package']

setup(
    name='InHousePackage', 
    version = '0.1', 
    description = 'A framework for building psychological experiments in Python', 
    author = 'me', 
    author_email = 'my_address', 
    url = 'a local git', 
    packages=install_packages,
    requires = ['numpy']
    )
share|improve this question
    
Do you have any plans of moving to python3 in the future? –  shuttle87 Dec 13 '14 at 23:04
    
For this project, no, alas; the third_party_package is critical and will, almost certainly, never be updated to Python 3. –  Jonline Dec 15 '14 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.