Skip to content

Instantly share code, notes, and snippets.

@siroken3
Last active December 27, 2015 01:29
Show Gist options
  • Select an option

  • Save siroken3/7245093 to your computer and use it in GitHub Desktop.

Select an option

Save siroken3/7245093 to your computer and use it in GitHub Desktop.
setup.pyをよく使うので雛形
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
pytest.main(self.test_args)
setup(name='PRODUCT_NAME',
packages=['ROOTPACKAGE','SUBPACKAGE'],
version='VERSION',
description='DESCRIPTION',
author='MYNAME',
author_email='MYNAME@MYADDRESS',
install_requires=[
'DEPENDMOD1>=VERSION',
'DEPENDMOD2',
],
test_require=[
'pytest'
]
scripts=[
'scripts/LAUNCHER_SCRIPT',
],
data_files=[
('DIRECTORY1',['script/DIRECTORY1_1','script/DIRECTORY1_2'])
],
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment