# ... up to this line the script is unchangedsetup( name=_this_package, version=version['__version__'], description='Description in here.', long_description=long_description, author='Bruce Wayne', author_email='bruce.wayne@example.com', url='http://example.com', license='MIT', packages=[_this_package], install_requires=['cffi'], include_package_data=True, classifiers=['Development Status :: 3 - Alpha','Intended Audience :: Science/Research','Programming Language :: Python :: 2.7','Programming Language :: Python :: 3.6' ], cmdclass={'build': extend_build()})
MANIFEST.in应该与Python模块和包一起安装,并包含以下内容:
include README.rst CMakeLists.txt
recursive-include account *.h *.f90 CMakeLists.txt
# this interface requires the header file and library file# and these can be either provided by interface_file_names.cfg# in the same path as this file# or if this is not found then using environment variables_this_path =Path(os.path.dirname(os.path.realpath(__file__)))_cfg_file = _this_path /'interface_file_names.cfg'if _cfg_file.exists(): config =ConfigParser() config.read(_cfg_file) header_file_name = config.get('configuration', 'header_file_name') _header_file = _this_path /'include'/ header_file_name _header_file =str(_header_file) library_file_name = config.get('configuration', 'library_file_name') _library_file = _this_path /'lib'/ library_file_name _library_file =str(_library_file)else: _header_file = os.getenv('ACCOUNT_HEADER_FILE')assert _header_file isnotNone _library_file = os.getenv('ACCOUNT_LIBRARY_FILE')assert _library_file isnotNone