Python Packaging - python

Trying to create a python package. Seems to work, but i get a warning.
my setup.py is:
#! /usr/bin/env python
from distutils.core import setup
setup(
name='myPKG',
version='0.02.01',
url='http://someURL.02.01',
packages=['scripts',
'statistics'],
author = 'Research-Team',
author_email = 'me#gmail.com',
description='This is my package',
scripts=['scripts/myScript.py'],
entry_points={'console_scripts' : ['myCommandlineName = scripts.myScript:testRequireDecorator']},
install_requires=['numpy >= 1.5.1', 'scipy >= 0.9.0', 'poster']
)
I get the following warnings. why, specifically, the two first user warning?
root#TK: python setup.py sdist
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'entry_points'
warnings.warn(msg)
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
warnings.warn(msg)
running sdist
running check
package init file 'scripts/__init__.py' not found (or not a regular file)
reading manifest template 'MANIFEST.in'
no previously-included directories found matching '.git'
warning: no previously-included files matching '*.pyc' found under directory '.'
writing manifest file 'MANIFEST'
creating myPKG-0.02.01
creating myPKG-0.02.01/scripts
creating myPKG-0.02.01/statistics
making hard links in myPKG-0.02.01...
hard linking README -> myPKG-0.02.01
hard linking setup.py -> myPKG-0.02.01
hard linking scripts/myScript.py -> myPKG-0.02.01/scripts
hard linking statistics/RunningMedian.py -> myPKG-0.02.01/statistics
hard linking statistics/RunningStdev.py -> myPKG-0.02.01/statistics
hard linking statistics/__init__.py -> myPKG-0.02.01/statistics
Creating tar archive
removing 'myPKG-0.02.01' (and everything under it)

You're using distutils, but you need at least setuptools in order to use those options.
from setuptools import setup

Related

python: create wheel from existing c extension

Our build pipeline spits out an *.so / *.pyb python extension through pybind11. As a step in the pipeline I need to package the extension as a wheel for easy distribution through pip. I am trying to come up with a setup.py that takes the existing library and does not rely on re-compiling the binaries through the setup.py (so I really don't want this). It would require a major rewrite of the devops scripts.
When having a folder structure such as:
setup.py
my_module.cpython-39-darwin.so
A very basic setup.py can create a functioning wheel (python setup.py bdist_wheel):
setup(
name = 'my_module',
version='0.9.102',
packages=["."],
package_data={'': ['*.so', '*.pyi']},
)
Unfortunately, the wheel is missing the important python tag and platform name, etc: my_module-0.9.102-py3-none-any.whl vs. my_module-0.9.102-cp39-cp39-macosx_10_13_x86_64.whl
Setting --python-tag and --plat-name works, setting --py-limited-api does not, however.
Through research I found that overwriting the distclass adds the correct tag again, but the Root-Is-Purelib is set back to false. This, unfortunately, creates a broken wheel when installing through pip as it puts the binary in a my_module-0.9.102.data/purelib folder...
Overwriting the is_pure seems to be ignored also:
from setuptools import setup, find_packages, Distribution
class BinaryDistribution(Distribution):
def is_pure(self):
return True
def has_ext_modules(foo):
return True
setup(
name = 'my_module',
version='0.9.102',
packages=["."],
package_data={'': ['*.so', '*.pyi']},
distclass=BinaryDistribution
)
What else can I do to wrap my pre-compiled python libraries to wheels for distribution without rewriting lots of the build pipeline?
Not a perfect solution but a functional wheel is created when using the wheel module instead:
from setuptools import setup
setup(name='my_module',
packages=['my_module'],
package_data={'': ['*.so', '*.pyi']},
)
create wheel with:
pip install wheel
pip wheel .

setuptools warning: Failed to find the configured license file 'L'

I am building a wheel using
python setup.py bdist_wheel
Basically setuptools library.
My project contains LICENSE.txt file in root directory of the repository.
Aim:
Properly include this particular license file in the wheel
Relevant Code:
setup(
...,
license_files='LICENSE.txt',
...
)
Error:
warning: Failed to find the configured license file 'L'
warning: Failed to find the configured license file 'C'
warning: Failed to find the configured license file 'N'
warning: Failed to find the configured license file 't
https://setuptools.readthedocs.io/en/latest/userguide/declarative_config.html#metadata
Setuptools official doc states the datatype of license_file to be "str" and license_files to be list-comma
Solution 1: Use license_file with str
setup(
...,
license_file='LICENSE.txt',
...
)
Solution 2a: Use license_files with comma separated list
setup(
...,
license_file=LICENSE.txt,
...
)
Solution 2b setup.cfg with license_files
I instead created a new file setup.cfg and upgraded my setuptools to allow it to pick up metadata from setup.cfg
[metadata]
license_files = <name-of-license-file>
Thanks to: https://stackoverflow.com/a/48691876/5157515

How to distribute type hints to PyPi?

I've worked on adding Python 3.5 type hints to the responses library. But when I test making a distribution, sdist or bdist_wheel, it doesn't install my .pyi file. I can see it being part of the distribution, but it doesn't go further than that.
You can see what I got in my repo here: https://github.com/gaqzi/responses/tree/feature/type-hints-file
I read PEP484 which mentions that stub files should be distributable. But I can't seem to figure out how. :)
Is there a problem because responses doesn't create a package? It's just a single module file and that's why it doesn't get added correctly?
What I see when I build the package:
% python setup.py sdist
running sdist
running egg_info
writing requirements to responses.egg-info/requires.txt
writing top-level names to responses.egg-info/top_level.txt
writing responses.egg-info/PKG-INFO
writing dependency_links to responses.egg-info/dependency_links.txt
reading manifest file 'responses.egg-info/SOURCES.txt'
writing manifest file 'responses.egg-info/SOURCES.txt'
running check
warning: check: missing meta-data: if 'author' supplied, 'author_email' must be supplied too
creating responses-0.6.0
creating responses-0.6.0/responses.egg-info
making hard links in responses-0.6.0...
hard linking README.rst -> responses-0.6.0
hard linking responses.py -> responses-0.6.0
hard linking responses.pyi -> responses-0.6.0
hard linking setup.cfg -> responses-0.6.0
hard linking setup.py -> responses-0.6.0
hard linking responses.egg-info/PKG-INFO -> responses-0.6.0/responses.egg-info
hard linking responses.egg-info/SOURCES.txt -> responses-0.6.0/responses.egg-info
hard linking responses.egg-info/dependency_links.txt -> responses-0.6.0/responses.egg-info
hard linking responses.egg-info/not-zip-safe -> responses-0.6.0/responses.egg-info
hard linking responses.egg-info/requires.txt -> responses-0.6.0/responses.egg-info
hard linking responses.egg-info/top_level.txt -> responses-0.6.0/responses.egg-info
copying setup.cfg -> responses-0.6.0
Writing responses-0.6.0/setup.cfg
Creating tar archive
removing 'responses-0.6.0' (and everything under it)
After I've installed the package I got this:
% pip install dist/responses-0.6.0.tar.gz
[...snip...]
Installing collected packages: responses
Successfully installed responses-0.6.0
% pwd
/Users/ba/.virtualenvs/responses/lib/python3.5/site-packages
% ls responses*
responses.py
responses-0.6.0.dist-info:
DESCRIPTION.rst METADATA RECORD WHEEL metadata.json top_level.txt
According to the mypy docs, you should pass package_data={"my_package": ["py.typed", "foo.pyi"]} as an argument to setup in setup.py. Note that "foo.pyi" is the relative path from the root of the package to be distributed to the
stub file (docs).
I've created an example repo where you can test this out at https://github.com/SKalt/stub_distrib_demo.

Can't get Pandas to install with OpenShift

I am ssh-ing a Flask application on OpenShift and one of the Python dependencies is Pandas 0.16.1. Looking through the OpenShift documentation, I created my setup.py file as follows:
from setuptools import setup
setup(name='MyApp',
version='0.1a',
description='some description',
author='me',
author_email='me#gmail.com',
url='http://myapp.com/',
install_requires=['Flask>=0.10.1','numpy>=1.9.2','pandas>=0.16.1'],
)
When creating the app using the requires, the process fails. The following error is produced... help!
The initial build for the application failed: Shell command
'/sbin/runuser -s /bin/sh 557ba9e9e0b8cd360b000131 -c "exec
/usr/bin/runcon 'unconfined_u:system_r:openshift_t:s0:c1,c69' /bin/sh
-c \"gear postreceive --init >> /tmp/initial-build.log 2>&1\""' returned an error. rc=137 .Last 10 kB of build output: Stopping Python
2.7 cartridge Repairing links for 1 deployments Building git ref 'master', commit 239ba5f Activating virtenv Running setup.py script..
running develop running egg_info creating GTFS_Viewer.egg-info writing
requirements to GTFS_Viewer.egg-info/requires.txt writing
GTFS_Viewer.egg-info/PKG-INFO writing top-level names to
GTFS_Viewer.egg-info/top_level.txt writing dependency_links to
GTFS_Viewer.egg-info/dependency_links.txt writing manifest file
'GTFS_Viewer.egg-info/SOURCES.txt' reading manifest file
'GTFS_Viewer.egg-info/SOURCES.txt' writing manifest file
'GTFS_Viewer.egg-info/SOURCES.txt' running build_ext Creating
/var/lib/openshift/557ba9e9e0b8cd360b000131/app-root/runtime/dependencies/python/virtenv/lib/python2.7/site-packages/GTFS-Viewer.egg-link
(link to .) Adding GTFS-Viewer 0.1a to easy-install.pth file Installed
/var/lib/openshift/557ba9e9e0b8cd360b000131/app-root/runtime/repo
Processing dependencies for GTFS-Viewer==0.1a Searching for
pandas>=0.16.1 Reading
http://mirror1.ops.rhcloud.com/mirror/python/web/simple/pandas/ Best
match: pandas 0.16.1 Downloading
mirror1.ops.rhcloud.com/mirror/python/web/packages/source/p/pandas/pandas-0.16.1.zip#md5=d465643d588c4f886b8e796ae56673ad
Processing pandas-0.16.1.zip Writing
/tmp/easy_install-97qgiA/pandas-0.16.1/setup.cfg Running
pandas-0.16.1/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-97qgiA/pandas-0.16.1/egg-dist-tmp-VpNuur warning: no
files found matching 'README.rst' no previously-included directories
found matching 'doc/build' warning: no directories found matching
'examples' warning: no previously-included files matching '*.so' found
anywhere in distribution warning: no previously-included files
matching '*.pyd' found anywhere in distribution warning: no
previously-included files matching '*.pyc' found anywhere in
distribution warning: no previously-included files matching '*~' found
anywhere in distribution warning: no previously-included files
matching '#*' found anywhere in distribution warning: no
previously-included files matching '.git*' found anywhere in
distribution warning: no previously-included files matching
'.DS_Store' found anywhere in distribution warning: no
previously-included files matching '*.png' found anywhere in
distribution In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/index.c:250:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" pandas/index.c: In function
'__pyx_f_6pandas_5index_11IndexEngine__maybe_get_bool_indexer':
pandas/index.c:4088: warning: '__pyx_v_last_true' may be used
uninitialized in this function pandas/index.c: In function
'__pyx_f_6pandas_5index_13Float64Engine__maybe_get_bool_indexer':
pandas/index.c:7981: warning: '__pyx_v_last_true' may be used
uninitialized in this function pandas/index.c: In function
'__pyx_f_6pandas_5index_11Int64Engine__maybe_get_bool_indexer':
pandas/index.c:7356: warning: '__pyx_v_last_true' may be used
uninitialized in this function pandas/index.c: In function
'__pyx_f_6pandas_5index__bin_search': pandas/index.c:8769: warning:
'__pyx_v_mid' may be used uninitialized in this function In file
included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/src/datetime/np_datetime.c:18:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
/opt/rh/python27/root/usr/include/python2.7/datetime.h:188: warning:
'PyDateTimeAPI' defined but not used In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/src/datetime/np_datetime_strings.c:17:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
pandas/src/datetime/np_datetime_strings.c: In function
'make_iso_8601_datetime':
pandas/src/datetime/np_datetime_strings.c:1147: warning: format
'%04ld' expects type 'long int', but argument 4 has type 'long long
int' pandas/src/datetime/np_datetime_strings.c:1147: warning: format
'%04ld' expects type 'long int', but argument 4 has type 'long long
int' pandas/src/datetime/np_datetime_strings.c: At top level:
pandas/src/datetime/np_datetime_strings.c:127: warning: 'get_gmtime'
defined but not used In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/src/period.c:251:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/__multiarray_api.h:1594:
warning: '_import_array' defined but not used
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/__ufunc_api.h:236:
warning: '_import_umath' defined but not used In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/src/datetime/np_datetime.c:18:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
/opt/rh/python27/root/usr/include/python2.7/datetime.h:188: warning:
'PyDateTimeAPI' defined but not used In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/src/datetime/np_datetime_strings.c:17:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
pandas/src/datetime/np_datetime_strings.c: In function
'make_iso_8601_datetime':
pandas/src/datetime/np_datetime_strings.c:1147: warning: format
'%04ld' expects type 'long int', but argument 4 has type 'long long
int' pandas/src/datetime/np_datetime_strings.c:1147: warning: format
'%04ld' expects type 'long int', but argument 4 has type 'long long
int' pandas/src/datetime/np_datetime_strings.c: At top level:
pandas/src/datetime/np_datetime_strings.c:127: warning: 'get_gmtime'
defined but not used In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from pandas/src/period_helper.h:12, from pandas/src/period_helper.c:1:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
pandas/src/period_helper.c:33: warning: 'NULL_AF_INFO' defined but not
used In file included from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1728,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17,
from
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:15,
from pandas/algos.c:250:
/opt/rh/python27/root/usr/lib64/python2.7/site-packages/numpy/core/include/numpy/npy_deprecated_api.h:11:2:
warning: #warning "Using deprecated NumPy API, disable it by #defining
NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
I have had the same problem: Installing pandas through requirements.txt or using pip did not work.
Openshift stops and kills the process when trying to compile algos.c. Here is the manual install workaround that did the trick for me (python3.3 cartridge). It is the result of an somewhat tedious try-and-error process, and I cannot really explain why it works. But you might want to give it a try.
Connect to openshift: rhc ssh <appname>.
Download latest pandas source into the /tmp directory to install manually
cd /tmp
mkdir pandas
cd pandas
wget https://pypi.python.org/packages/source/p/pandas/pandas-0.16.2.zip#md5=860a6c7e5e1a24bb0aa549b115830252
unzip pandas-0.16.2.zip
cd pandas-0.16.2
Edit the setup.py file using your favourite (available) editor, e.g. emacs and search for "algos". The second time it appears comment out the algos package in the variable ext_data:
...
index={'pyxfile': 'index',
'sources': ['pandas/src/datetime/np_datetime.c',
'pandas/src/datetime/np_datetime_strings.c']},
# algos={'pyxfile': 'algos',
# 'depends': [srcpath('generated', suffix='.pyx'),
# srcpath('join', suffix='.pyx')]},
parser={'pyxfile': 'parser',
'depends': ['pandas/src/parser/tokenizer.h',
'pandas/src/parser/io.h',
'pandas/src/numpy_helper.h'],
...
Run the first part of the installation procedure:
./setup.py install
Now, let us compile the missing algos piece by hand. To do so, remove the comments you made in step 2, and comment out all other entries (except the algos entry) in ext_data.
Run setup in "dry-run" mode to see the two gcccommands you need to compile algos
./setup.py -n build
Copy the first gcc command to run it from shell. When I tried this, this command made openshift shut down the connection. So, I adjusted it by removing doublicate options and remove the -O2 flag (i.e., the optimization). This worked for me:
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -I/opt/rh/python33/root/usr/include -Ipandas/src/klib -Ipandas/src -I/opt/rh/python33/root/usr/lib64/python3.3/site-packages/numpy/core/include -I$OPENSHIFT_HOMEDIR/python/virtenv/venv/include -I/opt/rh/python33/root/usr/include/python3.3m -c pandas/algos.c -o build/temp.linux-x86_64-3.3/pandas/algos.o
The second command can be run unchanged. For me it was:
gcc -pthread -shared -L/opt/rh/python33/root/usr/lib64 -L/usr/lib6464 build/temp.linux-x86_64-3.3/pandas/algos.o -L/opt/rh/python33/root/usr/lib64 -lpython3.3m -o build/lib.linux-x86_64-3.3/pandas/algos.cpython-33m.so
Now, the hand-made files need to be installed:
./setup.py install
Quick check if it worked for you. First cd to your home directory, then try python:
cd
python
Python 3.3.2 (default, Mar 20 2014, 20:25:51)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Delete the /tmp/pandas directory.
rm -rf /tmp/pandas
Hope this works for you, too!
Can you do that manually ? i.e :
ssh 12hh3456789hh01011#nameofapp-username.rhcloud.com
And activate the environment :
source app-root/runtime/dependencies/python/virtenv/bin/activate
And then install the dependencies. First Numpy
pip install -U numpy
And then Pandas:
pip install pandas
Restart Openshift Application from web console and commit the changes and deploy. it worked for me!

Pypi & PyPi Test Could not find any downloads that satisfy the requirement

I am trying to release software through pypi, and while pip can search for the library, it is unable to download the library.
I suspect it is an issue with the setup.py file,
doclines = __doc__.split("\n")
with open('requirements.txt') as f:
required = f.read().splitlines()
setup(
name='Directory_Caching',
packages=find_packages(),
version='1.0.6',
description = doclines[0],
long_description = "\n".join(doclines[2:]),
author='Benjamin Schollnick',
author_email='benjamin#schollnick.net',
license="MIT",
maintainer='Benjamin Schollnick',
maintainer_email='benjamin#schollnick.net',
platforms=["Any"],
url='https://github.com/bschollnick/Directory_Caching',
download_url = 'https://github.com/bschollnick/Directory_Caching/tarball/1.05',
#install_requires=required,
#requires=required,
keywords = ['caching', 'files', 'directories', 'scandir', 'naturalsort'],
classifiers=filter(None, classifiers.split("\n")),
)
Pypitest is accepting the file fine, via register, and the sdist upload is working fine.
-- Register
nerv:Directory_caching Benjamin$ python setup.py register -r pypitest
running register
running egg_info
deleting Directory_Caching.egg-info/requires.txt
writing Directory_Caching.egg-info/PKG-INFO
writing top-level names to Directory_Caching.egg-info/top_level.txt
writing dependency_links to Directory_Caching.egg-info/dependency_links.txt
reading manifest file 'Directory_Caching.egg-info/SOURCES.txt'
writing manifest file 'Directory_Caching.egg-info/SOURCES.txt'
running check
Registering Directory_Caching to https://testpypi.python.org/pypi
Server response (200): OK
nerv:Directory_caching Benjamin$ python setup.py sdist upload -r pypitest
running sdist
running egg_info
writing Directory_Caching.egg-info/PKG-INFO
writing top-level names to Directory_Caching.egg-info/top_level.txt
writing dependency_links to Directory_Caching.egg-info/dependency_links.txt
reading manifest file 'Directory_Caching.egg-info/SOURCES.txt'
writing manifest file 'Directory_Caching.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.rst, README.txt
running check
creating Directory_Caching-1.0.503
creating Directory_Caching-1.0.503/Directory_Caching
creating Directory_Caching-1.0.503/Directory_Caching.egg-info
making hard links in Directory_Caching-1.0.503...
hard linking setup.cfg -> Directory_Caching-1.0.503
hard linking setup.py -> Directory_Caching-1.0.503
hard linking Directory_Caching/__init__.py -> Directory_Caching-1.0.503/Directory_Caching
hard linking Directory_Caching/directory_caching.py -> Directory_Caching-1.0.503/Directory_Caching
hard linking Directory_Caching.egg-info/PKG-INFO -> Directory_Caching-1.0.503/Directory_Caching.egg-info
hard linking Directory_Caching.egg-info/SOURCES.txt -> Directory_Caching-1.0.503/Directory_Caching.egg-info
hard linking Directory_Caching.egg-info/dependency_links.txt -> Directory_Caching-1.0.503/Directory_Caching.egg-info
hard linking Directory_Caching.egg-info/top_level.txt -> Directory_Caching-1.0.503/Directory_Caching.egg-info
copying setup.cfg -> Directory_Caching-1.0.503
Writing Directory_Caching-1.0.503/setup.cfg
Creating tar archive
removing 'Directory_Caching-1.0.503' (and everything under it)
running upload
Submitting dist/Directory_Caching-1.0.503.tar.gz to https://testpypi.python.org/pypi
Server response (200): OK
nerv:Directory_caching Benjamin$ python setup.py register -r pypitest
running register
running egg_info
writing Directory_Caching.egg-info/PKG-INFO
writing top-level names to Directory_Caching.egg-info/top_level.txt
writing dependency_links to Directory_Caching.egg-info/dependency_links.txt
reading manifest file 'Directory_Caching.egg-info/SOURCES.txt'
writing manifest file 'Directory_Caching.egg-info/SOURCES.txt'
running check
Registering Directory_Caching to https://testpypi.python.org/pypi
Server response (200): OK
upload
nerv:Directory_caching Benjamin$ python setup.py sdist upload -r pypitest
running sdist
running egg_info
writing Directory_Caching.egg-info/PKG-INFO
writing top-level names to Directory_Caching.egg-info/top_level.txt
writing dependency_links to Directory_Caching.egg-info/dependency_links.txt
reading manifest file 'Directory_Caching.egg-info/SOURCES.txt'
writing manifest file 'Directory_Caching.egg-info/SOURCES.txt'
warning: sdist: standard file not found: should have one of README, README.rst, README.txt
running check
creating Directory_Caching-1.0.504
creating Directory_Caching-1.0.504/Directory_Caching
creating Directory_Caching-1.0.504/Directory_Caching.egg-info
making hard links in Directory_Caching-1.0.504...
hard linking setup.cfg -> Directory_Caching-1.0.504
hard linking setup.py -> Directory_Caching-1.0.504
hard linking Directory_Caching/__init__.py -> Directory_Caching-1.0.504/Directory_Caching
hard linking Directory_Caching/directory_caching.py -> Directory_Caching-1.0.504/Directory_Caching
hard linking Directory_Caching.egg-info/PKG-INFO -> Directory_Caching-1.0.504/Directory_Caching.egg-info
hard linking Directory_Caching.egg-info/SOURCES.txt -> Directory_Caching-1.0.504/Directory_Caching.egg-info
hard linking Directory_Caching.egg-info/dependency_links.txt -> Directory_Caching-1.0.504/Directory_Caching.egg-info
hard linking Directory_Caching.egg-info/top_level.txt -> Directory_Caching-1.0.504/Directory_Caching.egg-info
copying setup.cfg -> Directory_Caching-1.0.504
Writing Directory_Caching-1.0.504/setup.cfg
Creating tar archive
removing 'Directory_Caching-1.0.504' (and everything under it)
running upload
Submitting dist/Directory_Caching-1.0.504.tar.gz to https://testpypi.python.org/pypi
Server response (200): OK
If I run a verbose run on pip, the following errors appear to be the problem?
Skipping link https://testpypi.python.org/pypi/Directory_Caching/1.0.504 (from https://testpypi.python.org/pypi/Directory_Caching); unknown archive format: .504
Skipping link https://testpypi.python.org/pypi/Directory_Caching/1.0.503 (from https://testpypi.python.org/pypi/Directory_Caching); unknown archive format: .503
Skipping link https://testpypi.python.org/pypi/Directory_Caching/1.0.502 (from https://testpypi.python.org/pypi/Directory_Caching); unknown archive format: .502
Skipping link https://testpypi.python.org/pypi/Directory_Caching/1.0.501 (from https://testpypi.python.org/pypi/Directory_Caching); unknown archive format: .501
Skipping link https://testpypi.python.org/pypi/Directory_Caching/1.0.51 (from https://testpypi.python.org/pypi/Directory_Caching); unknown archive format: .51
Skipping link https://testpypi.python.org/pypi/Directory_Caching/1.0.5 (from https://testpypi.python.org/pypi/Directory_Caching); unknown archive format: .5
I have setup tags at Github (https://github.com/bschollnick/Directory_Caching), and using the links in pypi or pypi test appear to work fine. Any suggestions?
I'm not sure, this the basic setup i use though with no problem.
import os
from distutils.core import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = 'name',
packages = ['package'],
version = '1.0.0',
author = 'your name',
author_email = 'some_email#gmail.com',
url = 'github',
download_url = 'git download link',
keywords = ['keywords'],
description = 'short description',
long_description = read('README.txt'),
classifiers = [],
)

Categories

Resources