Skip to content

Commit

Permalink
Replace distutils by setuptools in setup.py(.in)
Browse files Browse the repository at this point in the history
  • Loading branch information
scotty007 committed Sep 24, 2020
1 parent 874d9de commit f19bb6a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions python/setup.py.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import glob
import os
import re

import distutils.command.install_lib
from distutils.core import setup
import setuptools.command.install_lib
from setuptools import setup


def listDataFiles(dirPath):
Expand All @@ -28,11 +31,11 @@ def listDataFiles(dirPath):


# see: http://stackoverflow.com/questions/11594905/how-do-i-correctly-pass-cmake-list-semicolon-sep-of-flags-to-set-target-proper
class my_install_lib(distutils.command.install_lib.install_lib):
class my_install_lib(setuptools.command.install_lib.install_lib):
def run(self):
testBinaryRegex = re.compile(r'^test\w+$')

distutils.command.install_lib.install_lib.run(self)
setuptools.command.install_lib.install_lib.run(self)

for fn in self.get_outputs():
# Hack to set executable bit for libavg cpptest
Expand Down Expand Up @@ -61,4 +64,3 @@ setup(name='libavg',
},
scripts=glob.glob('scripts/avg_*'),
)

0 comments on commit f19bb6a

Please sign in to comment.