Coder Social home page Coder Social logo

ament_python's People

Contributors

dirk-thomas avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ament_python's Issues

list ament_python as setup_requires to ensure installation

Following up on this comment from @tfoote.

Requiring the presence of a non-standard python module in setup.py means that we'll always require end users to manually install a dependency before they can set up and use an ament_python package.

For from-source builds, some of the capabilities handled by ament_python are handled by the ament build tool instead, but thus far the tool is not, nor is it intended to be, required to build ROS 2 projects (or other projects using ament but lacking examples I'm not inclined to consider them at the moment.)

The two capabilities provided by ament_python currently are

  1. the placement of data files into the ament package index
  2. fudging of the install-scripts location to install executables into a libexec directory rather than the provided or default bin directory.

Both of these are value-adds that improve interoperability with other ROS 2 components but are otherwise not required for the functionality provided by the python packages using this.

I'm not familiar enough with the Python ecosystem to say whether or not there is a way to provide the capabilities that ament_python and ament_tools currently do without requiring something to be present before setuptools resolves dependencies. But supposing that there is no such alternative and also supposing that we do not want to make mandatory the use of ament_tools, I think we can continue to use the ament_python package to provide additional install-time capabilities as long as we document for package creators how to gracefully degrade when ament_python is not available.

Something along the lines of

try:
    from ament_python import install_scripts_to_libexec
    install_scripts_to_libexec(package_name)
except ImportError:
    print("WARNING: without ament_python certain functionality will be disabled")

I am not proposing to guarantee that expected ament / ROS functionality and interoperability will still work when ament_python is not present, if we could do that, we would not need ament_python at all. Just that if setup.py is invoked when ament_python is unavailable, it still successfully installs a python package.

Doing this would resolve the outstanding issue on the ROS 2 buildfarm, because ament_python's absence would no longer crash setup.py while running setup.py clean during sourcedeb production.

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.