ichabod801 / t_games

A collection of command-line interface games written in Python.
GNU General Public License v3.0
20 stars 4 forks source link

Research and Implement PyPI Requirements #581

Closed ichabod801 closed 4 years ago

ichabod801 commented 4 years ago

I know I need setup.py and some dunder module attributes, but figure out exactly what I need.

ichabod801 commented 4 years ago

From realpython.com:

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.

ichabod801 commented 4 years ago

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",
        ]
    },
)
ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

Python.org also uses the same folder organization as realpython.com.

ichabod801 commented 4 years ago

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.

ichabod801 commented 4 years ago

The first answer to this StackOverflow question says you must create a package, although the question is not on point.

ichabod801 commented 4 years ago

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.