728x90
1. setup.py 를 내 작업공간에 만든다
2. 프로젝트의 메타데이터(이름, 버전 등)을 아래와 같이 작성한다. (패키징 작업)
from setuptools import find_namespace_packages, setup
setup(
name='test',
version='3.2.1',
description='Test',
author='SungJun',
author_email='xxxxx@naver.com',
packages=find_namespace_packages(where='src', include=['SungJun*']),
package_dir={'': 'src'},
install_requires=[
'numpy',
'pandas',
'matplotlib',
'mplfinance',
'tqdm',
'scikit-learn',
'tensorflow',
'torch',
]
)
3. PyPI에 패키지 업로드
PyPI에 로그인하고, twine과 같은 도구를 사용하여 패키지 빌드 후 업로드
4. 다른 유저들이 'pip install 내모듈' 로 다운이 가능하다.
728x90
'개발 > Python' 카테고리의 다른 글
[Python] @wraps 설명 (0) | 2024.09.02 |
---|---|
[Python] @classmethod vs getter, setter 사용 (0) | 2024.07.04 |
Python 정적 메소드(@staticmethod) (0) | 2024.03.14 |
파이썬 EXE 파일 만들기 (0) | 2023.12.31 |
파이썬 가상환경 설정법 (0) | 2023.12.16 |