forked from vspeter/MCP
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·30 lines (25 loc) · 1004 Bytes
/
setup.py
File metadata and controls
executable file
·30 lines (25 loc) · 1004 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/env python3
from distutils.core import setup
from distutils.command.build_py import build_py
from setuptools import find_packages
import os
class custom_build( build_py ):
def build_packages( self ):
# get all the .py files, unless they end in _test.py
# we don't need testing files in our published product
for package in self.packages:
package_dir = self.get_package_dir( package )
modules = self.find_package_modules( package, package_dir )
for ( package2, module, module_file ) in modules:
assert package == package2
if os.path.basename( module_file ).endswith( '_test.py' ) or os.path.basename( module_file ) == 'tests.py':
continue
self.build_module( module, module_file, package )
setup( name='mcp',
description='MCP',
author='Peter Howe',
author_email='pnhowe@gmail.com',
include_package_data=True,
packages=find_packages(),
cmdclass={ 'build_py': custom_build }
)