-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
36 lines (31 loc) · 1.11 KB
/
setup.py
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
31
32
33
34
35
36
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, shutil
from setuptools.command.install import install
from distutils.core import setup, Extension
from setuptools import setup, find_namespace_packages
TARGET_PATH = f'{os.environ["HOME"]}/.lk_scraper/'
SOURCE_PATH = 'config_files/'
if not os.path.isdir(TARGET_PATH):
os.makedirs(TARGET_PATH, exist_ok=True)
src = os.path.join(os.getcwd(), SOURCE_PATH)
for file_name in os.listdir(src):
full_file_name = os.path.join(src, file_name)
if os.path.isfile(full_file_name):
target_full_file_name = os.path.join(TARGET_PATH, file_name)
if not os.path.isfile(target_full_file_name):
shutil.copy(full_file_name, target_full_file_name)
else:
print("config file %s already exists" % target_full_file_name)
setup(name='lk_scraper',
version='1.0',
author='Jean-Louis Quéguiner',
author_email='[email protected]',
packages=find_namespace_packages(),
install_requires=[
'selenium',
'PyYAML',
'beautifulsoup4'
],
include_package_data=True
)