Closed ichabod801 closed 4 years ago
From realpython.com:
python setup.py sdist bdist_wheel
. This creates two files:twine upload --repository-url https://test.pypi.org/legacy/ dist/*
.twine upload dist/*
.The example package used for this uses a different folder structure. The analogy for t_games would be to have a t_games folder within the t_games folder. The lower folder would hold all the actual code. The upper folder would hold all the other files, like t_tests and support_files. It's not clear if I need that sort of file structure to make this work.
This is the setup.py file that realpython.com used for their example:
import pathlib
from setuptools import setup
# The directory containing this file
HERE = pathlib.Path(__file__).parent
# The text of the README file
README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup(
name="realpython-reader",
version="1.0.0",
description="Read the latest Real Python tutorials",
long_description=README,
long_description_content_type="text/markdown",
url="https://github.com/realpython/reader",
author="Real Python",
author_email="office@realpython.com",
license="MIT",
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
],
packages=["reader"],
include_package_data=True,
install_requires=["feedparser", "html2text"],
entry_points={
"console_scripts": [
"realpython=reader.__main__:main",
]
},
)
I'm seeing a couple of recommendations to try doing this with a dummy project first to make sure you understand what is going on.
Python.org also uses the same folder organization as realpython.com.
I've skimmed five or six different tutorials on this. They all use the same file structure, but none of them explicitly state it is necessary.
The first answer to this StackOverflow question says you must create a package, although the question is not on point.
I was to close this repo and move on. Putting it on PyPI does not advance that goal, and there's the off chance it could hinder it. So don't put it on PyPI and just tie the repo off.
I know I need setup.py and some dunder module attributes, but figure out exactly what I need.