Page 101 -
P. 101

sharing your code


          Your module supports both APIs


           Well done! It looks like your module is working well, as both APIs, the original
          1.0.0 API and the newer 1.1.0 API, can now be used.

           Let’s take a moment to create and upload a new distibution for PyPI. As
           before, let’s amend the version setting in the setup.py program:



                                 name         = 'nester',            Once again, be sure to change
                                 version      = '1.2.0',             the value associated with
                                                                    “version” in “setup.py”.
                                 py_modules   = ['nester'],


          And with the code changes applied, upload this new version of your
           distribution to PyPI:


                        File  Edit   Window  Help   UploadThree
                        $ python3 setup.py sdist upload
                        running sdist
                        running check
                        reading manifest file 'MANIFEST'
                        creating nester-1.2.0
                        making hard links in nester-1.2.0...
                        hard linking nester.py -> nester-1.2.0
                        hard linking setup.py -> nester-1.2.0
           This all looks   Creating tar archive
           fine and     removing 'nester-1.2.0' (and everything under it)
            dandy.      running upload
                        Submitting dist/nester-1.2.0.tar.gz to http://pypi.python.org/pypi
                        Server response (200): OK
                        $





           Success! The messages from setup.py confirm that the your latest version
           of nester is up on PyPI. Let’s hope this one satisfies all of your users.








                                                       Consider your code carefully. How might some of
                                                       your users still have a problem with this version of
                                                       your code?



                                                                                       you are here 4    65
   96   97   98   99   100   101   102   103   104   105   106