pygradle icon indicating copy to clipboard operation
pygradle copied to clipboard

pivy-importer: local repository could not find artifact ... under different name

Open blankdots opened this issue 8 years ago • 3 comments

I am having a issue with creating a specific artifact in the local repository, namely swagger-spec-validator. Create the artifact using java -jar /var/lib/pivy-importer-0.3.39-all.jar --repo /data swagger-spec-validator:2.0.2, it adds it however under a different artifact name than the one specified in the .ivy file below.

<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra" xmlns:m="http://ant.apache.org/ivy/maven">
  <info organisation="pypi" module="swagger-spec-validator" revision="2.0.2" />
  <configurations>
    <conf name="default" description="auto generated configuration for default" />
    <conf name="source" description="auto generated configuration for source" extends="default" />
  </configurations>
  <publications>
    <artifact name="swagger-spec-validator" ext="tar.gz" conf="default" type="tar.gz" />
  </publications>
  <dependencies defaultconfmapping="*-&gt;default">
    <dependency org="pypi" name="jsonschema" rev="2.5.1" conf="default" />
    <dependency org="pypi" name="setuptools" rev="33.1.1" conf="default" />
    <dependency org="pypi" name="six" rev="1.10.0" conf="default" />
  </dependencies>
</ivy-module>

It is under the name: swagger_spec_validator-2.0.2.tar.gz. Changing the name helps however ... is it a bug? Or is there a way to have the proper artifact name from the start? Or I am missing something?

blankdots avatar Jan 24 '17 11:01 blankdots

This seems like a bug. The artifact should be renamed to match what the ivy file suggests. I don't think this is something we'll get to soon, but if you're willing to take a stab at it, I'de be more than happy to point you in the right direction / review the PR.

ethankhall avatar Jan 25 '17 03:01 ethankhall

@ethankhall It would help if you can point me where to look and I will take a stab at it.

blankdots avatar Jan 25 '17 13:01 blankdots

You'll want to look around https://github.com/linkedin/pygradle/blob/master/pivy-importer/src/main/groovy/com/linkedin/python/importer/deps/DependencyDownloader.groovy#L67 I would look at changing DependencyDownloader#downloadArtifact to have a path to download to vs a directory to put it into.

ethankhall avatar Feb 01 '17 17:02 ethankhall