setup.py exclude some python files from bdist

后端 未结 2 2080
一整个雨季
一整个雨季 2020-12-17 17:30

I have a django project with this kind of architecture :

  • setup.py
  • project/
    • __init__.py
    • manage.py
    • settings/
      • __init
2条回答
  •  余生分开走
    2020-12-17 17:55

    def without_app(item):
        # http://docs.python.org/release/2.2.1/lib/string-methods.html
        return not bool(item.find('app_name') + 1) 
    
    # help(filter) - use in command line to read the docstring
    packages = filter(without_app, find_packages()) 
    

提交回复
热议问题