Update setup.py
This commit is contained in:
parent
30429b05a5
commit
8902955fed
@@ -1 +1,4 @@
|
|||||||
include requirements.txt
|
include requirements.txt
|
||||||
|
include requirements_test.txt
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
21
setup.py
21
setup.py
@@ -1,6 +1,6 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages, Command
|
||||||
from codecs import open
|
from codecs import open
|
||||||
from os import path
|
from os import path, system
|
||||||
import re
|
import re
|
||||||
|
|
||||||
package_name = "pytchat"
|
package_name = "pytchat"
|
||||||
@@ -14,7 +14,6 @@ def _test_requirements():
|
|||||||
return [name.rstrip() for name in open(path.join(root_dir, 'requirements_test.txt')).readlines()]
|
return [name.rstrip() for name in open(path.join(root_dir, 'requirements_test.txt')).readlines()]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
with open(path.join(root_dir, package_name, '__init__.py')) as f:
|
with open(path.join(root_dir, package_name, '__init__.py')) as f:
|
||||||
init_text = f.read()
|
init_text = f.read()
|
||||||
version = re.search(r'__version__\s*=\s*[\'\"](.+?)[\'\"]', init_text).group(1)
|
version = re.search(r'__version__\s*=\s*[\'\"](.+?)[\'\"]', init_text).group(1)
|
||||||
@@ -32,6 +31,18 @@ assert url
|
|||||||
with open('README.md', encoding='utf-8') as f:
|
with open('README.md', encoding='utf-8') as f:
|
||||||
long_description = f.read()
|
long_description = f.read()
|
||||||
|
|
||||||
|
class CleanCommand(Command):
|
||||||
|
"""Custom clean command to tidy up the project root."""
|
||||||
|
user_options = []
|
||||||
|
def initialize_options(self):
|
||||||
|
pass
|
||||||
|
def finalize_options(self):
|
||||||
|
pass
|
||||||
|
def run(self):
|
||||||
|
#system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')
|
||||||
|
system('rmdir /Q pytchat.egg-info')
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=package_name,
|
name=package_name,
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
@@ -57,5 +68,7 @@ setup(
|
|||||||
'License :: OSI Approved :: MIT License',
|
'License :: OSI Approved :: MIT License',
|
||||||
],
|
],
|
||||||
keywords='youtube livechat asyncio',
|
keywords='youtube livechat asyncio',
|
||||||
|
cmdclass={
|
||||||
|
'clean': CleanCommand,
|
||||||
|
}
|
||||||
)
|
)
|
||||||
Reference in New Issue
Block a user