Git Product home page Git Product logo

Comments (15)

hroncok avatar hroncok commented on August 13, 2024

The github trarball actually includes tests. It's only the PyPI sdist that does not.

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

The packaging code has been stable for "a while" (setup.py only lists the package, and the github release uses ncipollo/release-action@v1). Can you work with the tarball, or do you want me to include the tests in the PyPI package also? (I don't think any of my PyPI packages include tests...)

from pydeps.

penguinpee avatar penguinpee commented on August 13, 2024

The github trarball actually includes tests. It's only the PyPI sdist that does not.

It does not. The package uses the forge macros. So, we are pulling the tarball from GitHub. And it does not contain a tests directory.

Tarball used by spec file: https://github.com/thebjorn/pydeps/archive/v1.12.8/pydeps-1.12.8.tar.gz

This is for the PR updating the package.

The GitHub tarball for 1.11.1 does include it, indeed. However the tarball in the side cache does not. Maybe that was downloaded from PyPI. I don't know. But simple to verify:

fedpkg clone pydeps
cd pydeps
fedpkg sources
tar tzf pydeps-1.11.1.tar.gz | grep tests

from pydeps.

hroncok avatar hroncok commented on August 13, 2024

The Feodora package is in an inconsistent state, I've commented the details in https://src.fedoraproject.org/rpms/pydeps/pull-request/2# because I didn't want to bother upstream with Fedora-specific things.

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

The gitlab release .whl and tar.gz contains the same as released on PyPI (i.e. no tests), the Source code (zip) and (tar.gz) do contain the tests.

from pydeps.

penguinpee avatar penguinpee commented on August 13, 2024

(dev38) go|c:\srv\tmp> tar xvf pydeps-1.12.8.tar
x pydeps-1.12.8/
x pydeps-1.12.8/LICENSE
x pydeps-1.12.8/PKG-INFO
x pydeps-1.12.8/README.rst
x pydeps-1.12.8/pydeps/
x pydeps-1.12.8/pydeps/init.py
x pydeps-1.12.8/pydeps/main.py
x pydeps-1.12.8/pydeps/arguments.py
x pydeps-1.12.8/pydeps/cli.py
x pydeps-1.12.8/pydeps/colors.py
x pydeps-1.12.8/pydeps/configs.py
x pydeps-1.12.8/pydeps/depgraph.py
x pydeps-1.12.8/pydeps/depgraph2dot.py
x pydeps-1.12.8/pydeps/dot.py
x pydeps-1.12.8/pydeps/dummymodule.py
x pydeps-1.12.8/pydeps/mf27.py
x pydeps-1.12.8/pydeps/mfimp.py
x pydeps-1.12.8/pydeps/package_names.py
x pydeps-1.12.8/pydeps/py2depgraph.py
x pydeps-1.12.8/pydeps/pycompat.py
x pydeps-1.12.8/pydeps/pydeps.py
x pydeps-1.12.8/pydeps/pystdlib.py
x pydeps-1.12.8/pydeps/render_context.py
x pydeps-1.12.8/pydeps/target.py
x pydeps-1.12.8/pydeps.egg-info/
x pydeps-1.12.8/pydeps.egg-info/PKG-INFO
x pydeps-1.12.8/pydeps.egg-info/SOURCES.txt
x pydeps-1.12.8/pydeps.egg-info/dependency_links.txt
x pydeps-1.12.8/pydeps.egg-info/entry_points.txt
x pydeps-1.12.8/pydeps.egg-info/requires.txt
x pydeps-1.12.8/pydeps.egg-info/top_level.txt
x pydeps-1.12.8/setup.cfg
x pydeps-1.12.8/setup.py

I don't see a tests directory listed for the tarball.

Can you work with the tarball

Yes, I can work with the GitHub tarball.

The gitlab release .whl and tar.gz contains the same as released on PyPI (i.e. no tests), the Source code (zip) and (tar.gz) do contain the tests.

Well, what is downloaded and what I checked are the GitHub and PyPI release tarballs. I could probably check to see if we can use the source tarball. But if it's easy to include tests in the GitHub release tarball, I'd prefer that.

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

Ok, give me a couple of minutes..

from pydeps.

penguinpee avatar penguinpee commented on August 13, 2024

Hold on. It seems we are using the source tarball after all. I must have made a mistake when uploading to the side cache. So, we should be good without any modifications.

Sorry for all the fuzz.

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

Lolz. Well, 1.12.9 is out and it contains the tests :-)

from pydeps.

penguinpee avatar penguinpee commented on August 13, 2024

Thanks for the quick action. It doesn't hurt. I will need to step away from the keyboard for a bit. I must have taken a wrong turn somewhere. My apologies for all the fuzz.

But it's all settled now. I've updated to 1.12.9 right away and made sure everything is in place. Feel free to revert your changes again, if you prefer.

I did see an error running tests with the 1.12.9 release. I'll look into it and file a new issue if it turns out to be an upstream issue, not a Fedora quirk.

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

There is an mf directory containing snapshots of the standard python modulefinder module at various versions (including the 2.7 version which is causing your issue). They're just stored for reference they're not imported anywhere... Looks like your build step is trying to compile everything?

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

Excluding files/directories from packaging was a bit more trouble than I anticipated, so I've moved the pydeps/mf directory to docs. Version 1.12.10 will be available on PyPI/github as soon as CI/CD har run.

from pydeps.

penguinpee avatar penguinpee commented on August 13, 2024

Excluding files/directories from packaging was a bit more trouble than I anticipated, so I've moved the pydeps/mf directory to docs.

With packages_find() introduced in 1.12.9 the tests directory will be included and installed as a top level module. There's several options to make that work:

  1. Remove the packages option entirely. Enables autodiscovery, which will exclude tests by default.
  2. Add include=['pydeps*'] in packages_find()
  3. Add exclude=['tests*'] in packages_find()

With pydeps/mf moved to docks, that should be all. If you wanted to exclude that directory in it's original place, I'd go for option 3 and expand the exclude list: exclude=['tests*', 'pydeps.mf*'].

Let me know what you prefer and I can provide a patch.

from pydeps.

thebjorn avatar thebjorn commented on August 13, 2024

The problem I was having was that python -m build didn't pay attention to the packages_find(exclude=...) - it may well be because I was "doing it wrogn". (I was using python setup.py sdist bdist_wheel previously.

Upon closer inspection, the tar.gz file contains the tests, but the .whl file does not (with packages_find(exclude=["tests*"])), so I'm guessing that is correct.

Version 1.12.12 is available on PyPI and github with this setup.

from pydeps.

penguinpee avatar penguinpee commented on August 13, 2024

exclude and include are globs. The asterisk is easily overlooked and forgotten making the glob fail. I've been there... 😉

from pydeps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.