[Code] [Python] distutils setup.py Data Files Problem

Dieses Thema im Forum "Programmierung & Entwicklung" wurde erstellt von cable, 1. März 2010 .

Status des Themas:
Es sind keine weiteren Antworten möglich.
  1. 1. März 2010
    [Python] distutils setup.py Data Files Problem

    Hoi!

    Ich hab vor nem Monat oder so mal einen Auto-Gratulationsbot für Wer-Kennt-Wen geschrieben und wollte den hier mal vorstellen, bzw. den veröffentlichen.
    Ich habe alle relevanten Daten in ein Ordner gepackt und mein Script sieht nun so aus:

    Code:
    from distutils.core import setup
    setup(name='WKW-BDayPoster',
     version='1.0',
     author='cable',
     packages=['mechanize'],
     py_modules=['wkw'],
     data_files=[('', ['messages.txt'])],
     )
    Das geht auch _fast_ alles, nur kommt dann die messages.txt einfach nicht mit. Ich ha auch schon eine Ordner erstellt mit dem Name conf und die Datei darein gepackt, es wird einfach nicht mitgeladen und ins Archiv gepackt. (Habe auch '.', './' etc probiert) Hat Jemand ne Ahnung woran das liegt? Hab schon fast alles ausprobiert. Die messages.txt liegt im gleichen Ordner wie die wkw.py.

    //Hier der Output (da wird die Datei gar nicht erwähnt):
    Code:
    C:\Python26\Projects\WKW\install>python setup.py sdist
    running sdist
    warning: sdist: missing required meta-data: url
    warning: sdist: missing meta-data: if 'author' supplied, 'author_email' must be
    supplied too
    warning: sdist: manifest template 'MANIFEST.in' does not exist (using default fi
    le list)
    writing manifest file 'MANIFEST'
    creating WKW-BDayPoster-1.0
    creating WKW-BDayPoster-1.0\mechanize
    copying files to WKW-BDayPoster-1.0...
    copying README -> WKW-BDayPoster-1.0
    copying setup.py -> WKW-BDayPoster-1.0
    copying wkw.py -> WKW-BDayPoster-1.0
    copying mechanize\__init__.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_auth.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_beautifulsoup.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_clientcookie.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_debug.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_file.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_firefox3cookiejar.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_gzip.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_headersutil.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_html.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_http.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_lwpcookiejar.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_mechanize.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_mozillacookiejar.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_msiecookiejar.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_opener.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_pullparser.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_request.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_response.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_rfc3986.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_seek.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_sockettimeout.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_testcase.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_upgrade.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_urllib2.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_useragent.py -> WKW-BDayPoster-1.0\mechanize
    copying mechanize\_util.py -> WKW-BDayPoster-1.0\mechanize
    creating dist
    creating 'dist\WKW-BDayPoster-1.0.zip' and adding 'WKW-BDayPoster-1.0' to it
    adding 'WKW-BDayPoster-1.0\PKG-INFO'
    adding 'WKW-BDayPoster-1.0\README'
    adding 'WKW-BDayPoster-1.0\setup.py'
    adding 'WKW-BDayPoster-1.0\wkw.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_auth.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_beautifulsoup.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_clientcookie.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_debug.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_file.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_firefox3cookiejar.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_gzip.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_headersutil.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_html.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_http.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_lwpcookiejar.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_mechanize.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_mozillacookiejar.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_msiecookiejar.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_opener.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_pullparser.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_request.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_response.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_rfc3986.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_seek.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_sockettimeout.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_testcase.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_upgrade.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_urllib2.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_useragent.py'
    adding 'WKW-BDayPoster-1.0\mechanize\_util.py'
    adding 'WKW-BDayPoster-1.0\mechanize\__init__.py'
    removing 'WKW-BDayPoster-1.0' (and everything under it)
    Auf der Referenzseite von python.org steht:
    Klick mich!

    greez

    //Hab es gelöst: Man muss die Datei scheinbar noch explizit mit "include messages.txt" in einer MANIFEST.in angeben!

    CLOSED!
     
  2. Video Script

    Videos zum Themenbereich

    * gefundene Videos auf YouTube, anhand der Überschrift.