Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP issue #84 #104

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,12 @@ test:
coverage combine
coverage report --fail-under 40

unclean: langNames.db
cp -a langNames.db README.md COPYING apertium_apy/

clean:
rm -f langNames.db
rm -f apertium_apy/langNames.db apertium_apy/README.md apertium_apy/COPYING

distclean: clean
rm -rf dist/ build/ *.egg-info/ .mypy_cache/ .coverage
21 changes: 5 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from os import listdir, path
from os import path
from setuptools import setup, find_packages
from setuptools.command.install import install
from subprocess import check_call, CalledProcessError
Expand All @@ -9,7 +9,7 @@
class InstallHelper(install):
def run(self):
try:
check_call(['make', 'langNames.db'])
check_call(['make', 'unclean'])
except CalledProcessError:
pass

Expand All @@ -21,13 +21,6 @@ def run(self):
pass


def files(root):
for file_or_dir in listdir(root):
full_path = path.join(root, file_or_dir)
if path.isfile(full_path):
yield full_path


setup(
name='apertium-apy',
version=apy.__version__,
Expand Down Expand Up @@ -64,13 +57,9 @@ def files(root):
'console_scripts': ['apertium-apy=apertium_apy.apy:main'],
},
packages=find_packages(exclude=['tests']),
data_files=[
('apertium_apy', ['README.md', 'COPYING', 'langNames.db']),
('apertium_apy/tools', files('tools')),
('apertium_apy/tools/systemd', files('tools/systemd')),
('apertium_apy/tools/sysvinit', files('tools/sysvinit')),
('apertium_apy/tools/upstart', files('tools/upstart')),
],
package_data={
'apertium_apy': ['README.md', 'COPYING', 'langNames.db'],
},
cmdclass={
'install': InstallHelper,
},
Expand Down