# Python 패키지를 만드는 법 2021

> Clean Markdown view of GeekNews topic #4039. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=4039](https://news.hada.io/topic?id=4039)
- GeekNews Markdown: [https://news.hada.io/topic/4039.md](https://news.hada.io/topic/4039.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-04-09T09:04:19+09:00
- Updated: 2021-04-09T09:04:19+09:00
- Original source: [antonz.org](https://antonz.org/python-packaging/)
- Points: 18
- Comments: 1

## Topic Body

- 간단한 파이썬 유틸리티를 만들어서 공유할 때 패키지로 만드는 법을 차근 차근 설명

1. 기능 작성

2. flit 을 이용해 기본 패키지 형태를 작성하고 TestPyPI 에 등록해서 테스트

3. flit 로 PyPI 에 실제 등록

4. README 와 CHANGELOG 추가

5. tox 로 포매팅(black), 테스트 커버리지(coverage), 코드 퀄리티(flake8, pylint, mccabe), 정적 분석(mypy), 등 적용하기

6. GitHub Actions 로 자동 빌드 설정하고, 커밋할 때 마다 Codecov로 커버리지 & Clode Climate 로 코드 품질 테스트

7. make 로 pylint, coverage 등만 빠르게 실행하게 만들기

8. GitHub Actions 에 flit 로 자동 publish 적용

## Comments



### Comment 4825

- Author: xguru
- Created: 2021-04-09T09:04:28+09:00
- Points: 2

https://news.ycombinator.com/item?id=26733423

HN에서는 더 간단히 하려면 setup.py 작성하고 twine 패키지 이용하라는 댓글이 1등이더군요.
