Reputation: 8043
I am having a fair bit of trouble setting up my python package.
I am trying to make it installable via pip by using PYPI.
This is what my project structure looks like:
|-scum
\
| LICENSE
| MANIFEST
| README.md
| README.rst
| scum
| scum.py
| setup.py
|
|- |modules
| \
| | __init__.py
| | browse.py
| | popup.py
| | term.py
|
|- |resources
| \
| | config.txt
| | help.txt
| | start_up.txt
| | tabs.dat
I need to be able to import the files in modules
and I need my main file scum.py
to be able to access the files in resources
This is my setup.py:
import sys
from distutils.core import setup
from pkgutil import walk_packages
import modules
import resources
if sys.version_info[0] < 3:
sys.exit("Scum requires Python 3.")
VERSION = '0.2'
setup_kwargs = {
"version": VERSION,
"description": 'Scum text editor',
"author": 'Christian Careaga',
"author_email": 'christian.careaga7@gmail.com',
"url": 'https://github.com/CCareaga/scum',
"download_url": "https://github.com/CCareaga/scum/zipball/" + VERSION,
"classifiers": [
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Topic :: Utilities",
"Topic :: Text Editors",
],
"data_files": [("", ['README.rst']),
("resources", ['config.txt', 'help.txt', 'start_up.txt', 'tabs.dat'])]
}
if __name__ == '__main__':
setup(
name='scum',
py_modules=['scum'],
scripts=['scum'],
packages = ['modules'],
include_package_data=True,
long_description=open('README.rst').read(),
**setup_kwargs
)
This setup.py file is not working, I changed a few things since I tested it but I can't figure out how to upload a new version of my package with out creating a whole new tag and release number.
Any help would be appreciated, I have had trouble finding good documentation on this that isn't for very basic packages.
Upvotes: 0
Views: 68
Reputation: 1672
I had not the same problem, but a similar one. To solve it I just deleted the PyPi release and also deleted the auto generated files by the setup.py file (I had several version files in a folder) and just re-uploaded everything with twine.
You may try it out, but I guess you also have to change the version number!
See also my answer here: PyPI 400 upload error . It may help you.
Upvotes: 1